From 440ce420bd626dedd8932967c42e6ffdda213140 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Thu, 12 May 2016 12:46:02 +0100 Subject: [PATCH] Put clang analyzer fix inside __clang_analyzer__ guard --- programs/hash/generic_sum.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/programs/hash/generic_sum.c b/programs/hash/generic_sum.c index 7805a79bc..d1e81d491 100644 --- a/programs/hash/generic_sum.c +++ b/programs/hash/generic_sum.c @@ -83,8 +83,13 @@ static int generic_check( const mbedtls_md_info_t *md_info, char *filename ) int nb_err1, nb_err2; int nb_tot1, nb_tot2; unsigned char sum[MBEDTLS_MD_MAX_SIZE]; - char buf[MBEDTLS_MD_MAX_SIZE * 2 + 1] = { }, line[1024]; + char line[1024]; char diff; +#if defined(__clang_analyzer__) + char buf[MBEDTLS_MD_MAX_SIZE * 2 + 1] = { }; +#else + char buf[MBEDTLS_MD_MAX_SIZE * 2 + 1]; +#endif if( ( f = fopen( filename, "rb" ) ) == NULL ) {