{"thread":{"id":"32060","subject":"[PATCH] remote-curl.c: Fix a gcc warning","startedAt":"2012-11-10T18:34:51Z","lastAt":"2012-11-10T18:34:51Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"202765","messageId":"509E9E4B.6020705@ramsay1.demon.co.uk","threadId":"32060","inReplyTo":null,"subject":"[PATCH] remote-curl.c: Fix a gcc warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-11-10T18:34:51Z","receivedAt":"2012-11-10T18:34:51Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn particular, gcc complains as follows:\n\n        CC remote-curl.o\n    remote-curl.c: In function `rpc_service':\n    remote-curl.c:403: warning: 'gzip_size' might be used uninitialized \\\n        in this function\n\nThe 'gzip_size' variable would not, in fact, be used uninitialized.\nHowever, in order to suppress the warning, we simply initialize the\nvariable to zero in it's declaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Jeff,\n\nCould you please squash this into commit df126e108 (\"remote-curl: hoist\ngzip buffer size to top of post_rpc\", 31-10-2012), which is part of\nyour 'jk/maint-http-half-auth-fetch' branch.\n\nThanks!\n\nATB,\nRamsay Jones\n\n remote-curl.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/remote-curl.c b/remote-curl.c\nindex d8b3600..9a8b123 100644\n--- a/remote-curl.c\n+++ b/remote-curl.c\n@@ -400,7 +400,7 @@ static int post_rpc(struct rpc_state *rpc)\n \tstruct curl_slist *headers = NULL;\n \tint use_gzip = rpc->gzip_request;\n \tchar *gzip_body = NULL;\n-\tsize_t gzip_size;\n+\tsize_t gzip_size = 0;\n \tint err, large_request = 0;\n \n \t/* Try to load the entire request, if we can fit it into the\n-- \n1.8.0\n"}]}