{"thread":{"id":"35074","subject":"[PATCH 3/6] wrapper.c: Fix a sparse warning","startedAt":"2013-10-06T20:50:00Z","lastAt":"2013-10-06T20:50:00Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"228588","messageId":"5251CCF8.3070207@ramsay1.demon.co.uk","threadId":"35074","inReplyTo":null,"subject":"[PATCH 3/6] wrapper.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-10-06T20:50:00Z","receivedAt":"2013-10-06T20:50:00Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nWhen the NO_MKSTEMPS build variable is not set, sparse issues an\n\"'gitmkstemps' was not declared. Should it be static?\" warning.\nThe 'gitmkstemps' function definition is only required when the\nNO_MKSTEMPS variable is set. In order to suppress the warning,\nuse a preprocessor conditional to include the definition only\nwhen needed.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n wrapper.c | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/wrapper.c b/wrapper.c\nindex f92b147..9a6aaaf 100644\n--- a/wrapper.c\n+++ b/wrapper.c\n@@ -360,10 +360,12 @@ int git_mkstemp_mode(char *pattern, int mode)\n \treturn git_mkstemps_mode(pattern, 0, mode);\n }\n \n+#ifdef NO_MKSTEMPS\n int gitmkstemps(char *pattern, int suffix_len)\n {\n \treturn git_mkstemps_mode(pattern, suffix_len, 0600);\n }\n+#endif\n \n int xmkstemp_mode(char *template, int mode)\n {\n-- \n1.8.4\n"}]}