summaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2012-11-21 19:08:51 +0000
committerJunio C Hamano <gitster@pobox.com>2012-11-21 11:54:32 -0800
commit377115493a9f3700f9b71de9ac86464b8bfd3fa2 (patch)
treec04d5311de7b72b61e4c9d6201c2b0319a0784e8 /remote-curl.c
parent2e736fd5e94c6fa44ba95d81a5b0ae407b968b78 (diff)
downloadgit-377115493a9f3700f9b71de9ac86464b8bfd3fa2.tar.gz
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>
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c
index fac2befd86..5b1bb1991d 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -413,7 +413,7 @@ static int post_rpc(struct rpc_state *rpc)
struct curl_slist *headers = NULL;
int use_gzip = rpc->gzip_request;
char *gzip_body = NULL;
- size_t gzip_size;
+ size_t gzip_size = 0;
int err, large_request = 0;
/* Try to load the entire request, if we can fit it into the