{"thread":{"id":"34552","subject":"[PATCH] revision.c: Fix a sparse warning","startedAt":"2013-07-27T18:39:31Z","lastAt":"2013-07-27T18:39:31Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"224189","messageId":"51F413E3.7000608@ramsay1.demon.co.uk","threadId":"34552","inReplyTo":null,"subject":"[PATCH] revision.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-07-27T18:39:31Z","receivedAt":"2013-07-27T18:39:31Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSparse issues an \"symbol 'saved_parents_slab' was not declared. Should\nit be static?\" warning. In order to suppress the warning, since this\nsymbol does not require more than file visibility, we simply add the\nstatic modifier to its declaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Thomas,\n\nIn addition to the gcc warning, sparse weighs in with this warning,\nprovoked by commit 3b3d83e5 (\"[PERHAPS LIKE THIS] log: use true parents\nfor diff even when rewriting\", 22-07-2013).\n\nIf you update this commit, could you please squash this into the new patch.\n\nThanks!\n\nATB,\nRamsay Jones\n\n revision.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/revision.c b/revision.c\nindex f242363..fa355d0 100644\n--- a/revision.c\n+++ b/revision.c\n@@ -3074,7 +3074,7 @@ void put_revision_mark(const struct rev_info *revs, const struct commit *commit)\n }\n \n define_commit_slab(saved_parents, struct commit_list *);\n-struct saved_parents saved_parents_slab;\n+static struct saved_parents saved_parents_slab;\n static int saved_parents_initialized;\n \n void save_parents(struct commit *commit)\n-- \n1.8.3\n"}]}