Skip to content

Commit 3771154

Browse files
Ramsay Jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2e736fd commit 3771154

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

remote-curl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static int post_rpc(struct rpc_state *rpc)
413413
struct curl_slist *headers = NULL;
414414
int use_gzip = rpc->gzip_request;
415415
char *gzip_body = NULL;
416-
size_t gzip_size;
416+
size_t gzip_size = 0;
417417
int err, large_request = 0;
418418

419419
/* Try to load the entire request, if we can fit it into the

0 commit comments

Comments
 (0)