{"thread":{"id":"35072","subject":"[PATCH 1/6] config.c: Fix a sparse warning","startedAt":"2013-10-06T20:48:29Z","lastAt":"2013-10-07T11:31:36Z","messageCount":2,"participants":["Ramsay Jones","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"228586","messageId":"5251CC9D.9040309@ramsay1.demon.co.uk","threadId":"35072","inReplyTo":null,"subject":"[PATCH 1/6] config.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-10-06T20:48:29Z","receivedAt":"2013-10-06T20:48:29Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSparse issues an \"'git_parse_unsigned' was not declared. Should it\nbe static?\" warning. In order to suppress this warning, since this\nsymbol only requires file scope, we simply add the static modifier\nto its declaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n config.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/config.c b/config.c\nindex 6588cf5..e1d66a1 100644\n--- a/config.c\n+++ b/config.c\n@@ -498,7 +498,7 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)\n \treturn 0;\n }\n \n-int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max)\n+static int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max)\n {\n \tif (value && *value) {\n \t\tchar *end;\n-- \n1.8.4\n"},{"id":"228597","messageId":"20131007113135.GB5792@sigill.intra.peff.net","threadId":"35072","inReplyTo":"5251CC9D.9040309@ramsay1.demon.co.uk","subject":"Re: [PATCH 1/6] config.c: Fix a sparse warning","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-10-07T11:31:36Z","receivedAt":"2013-10-07T11:31:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Oct 06, 2013 at 09:48:29PM +0100, Ramsay Jones wrote:\n\n> Sparse issues an \"'git_parse_unsigned' was not declared. Should it\n> be static?\" warning. In order to suppress this warning, since this\n> symbol only requires file scope, we simply add the static modifier\n> to its declaration.\n\nThanks. This one is my fault. Commit 7192777 refactors git_parse_ulong,\nwhich is public, into a more generic function. But since we kept the\ngit_parse_ulong wrapper, only that part needs to be public; nobody\noutside the file calls the lower-level git_parse_unsigned.\n\n-Peff\n"}]}