remote-curl.c: Fix a compiler warning
In particular, gcc issues an "'gzip_size' might be used uninitialized" warning (-Wuninitialized). However, this warning is a false positive, since the 'gzip_size' variable would not, in fact, be used uninitialized. In order to suppress the warning, we simply initialise the variable to zero in it's declaration. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramsay Jones committed
Nov 21, 2012 at 19:08 UTC
377115493a9f3700f9b71de9ac86464b8bfd3fa2
1 file changed
+1
-1
remote-curl.c
+1
-1
@@ -413,7 +413,7 @@ static int post_rpc(struct rpc_state *rpc)
413
struct curl_slist *headers = NULL;
414
int use_gzip = rpc->gzip_request;
415
char *gzip_body = NULL;
416
- size_t gzip_size;
416
+ size_t gzip_size = 0;
417
int err, large_request = 0;
418
419
/* Try to load the entire request, if we can fit it into the