{"thread":{"id":"30687","subject":"[PATCH] dir.c: Fix a sparse warning","startedAt":"2012-06-02T17:05:36Z","lastAt":"2012-06-02T17:05:36Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"192722","messageId":"4FCA47E0.7020700@ramsay1.demon.co.uk","threadId":"30687","inReplyTo":null,"subject":"[PATCH] dir.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-06-02T17:05:36Z","receivedAt":"2012-06-02T17:05:36Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn particular, sparse complains as follows:\n\n        SP dir.c\n    dir.c:291:12: warning: symbol 'wildcards' was not declared. \\\n        Should it be static?\n\nIn order to suppress the warning, since 'wildcards' does not need\nto be an external symbol, we simply add the static modifier to the\ndeclaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Nguyen,\n\nIf you need to re-roll the 'nd/exclude-workaround-top-heavy' branch,\ncould you please squash this into commit dedbd80c (\"exclude: do strcmp\nas much as possible before fnmatch\", 26-05-2012).\n\nThanks!\n\nATB,\nRamsay Jones\n\n dir.c |    2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/dir.c b/dir.c\nindex 1b1a325..571eb0d 100644\n--- a/dir.c\n+++ b/dir.c\n@@ -288,7 +288,7 @@ int match_pathspec_depth(const struct pathspec *ps,\n \treturn retval;\n }\n \n-const char *wildcards = \"*?[{\\\\\";\n+static const char *wildcards = \"*?[{\\\\\";\n \n static int no_wildcard(const char *string)\n {\n-- \n1.7.10\n"}]}