{"thread":{"id":"48494","subject":"[PATCH] commit: fix sparse 'not declared' warning","startedAt":"2018-05-14T19:21:02Z","lastAt":"2018-05-14T19:21:02Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"347621","messageId":"e2c4276f-bcfd-faaa-f9ee-cb50e99da663@ramsayjones.plus.com","threadId":"48494","inReplyTo":null,"subject":"[PATCH] commit: fix sparse 'not declared' warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2018-05-14T19:20:54Z","receivedAt":"2018-05-14T19:21:02Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Duy,\n\nIf you need to re-roll your 'nd/commit-util-to-slab' branch, could\nyou please squash this into the relevant patch (commit 37de2f0a93,\n\"merge: use commit-slab in merge remote desc instead of commit->util\",\n2018-05-13).\n\nAlso, my 'static-check.pl' script has pinged on this series due\nto the use of the 'implement_shared_commit_slab' macro in revision.c\n(commit 85d055e876, \"revision.c: use commit-slab for show_source\",\n2018-05-13).\n\nThis is because that macro only allows you to set the 'scope' of the\ncomplete set of functions that are declared there - in this case three\nof them are not called (well, two are actually called by another two\nfunctions in the set) outside of revision.c.\n\nIn particular, the functions 'clear_revision_sources',\n'init_revision_sources_with_stride' (used in init_##slabname) and\n'revision_sources_at_peek' (used in slabname##_at).\n\nI haven't thought too deeply about this issue, or if it even\nmatters, so I have no solutions to offer. ;-)\n\nThanks!\n\nATB,\nRamsay Jones\n\n commit.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/commit.c b/commit.c\nindex 38a3c0e5e..c0582df16 100644\n--- a/commit.c\n+++ b/commit.c\n@@ -1657,7 +1657,7 @@ int commit_tree_extended(const char *msg, size_t msg_len,\n }\n \n define_commit_slab(merge_desc_slab, struct merge_remote_desc *);\n-struct merge_desc_slab merge_desc_slab = COMMIT_SLAB_INIT(1, merge_desc_slab);\n+static struct merge_desc_slab merge_desc_slab = COMMIT_SLAB_INIT(1, merge_desc_slab);\n \n struct merge_remote_desc *merge_remote_util(struct commit *commit)\n {\n-- \n2.17.0\n"}]}