{"thread":{"id":"33636","subject":"[PATCH 1/6] clone: Make the 'junk_mode' symbol a file static","startedAt":"2013-04-27T18:39:04Z","lastAt":"2013-04-28T01:55:40Z","messageCount":3,"participants":["Ramsay Jones","Jeff King","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"215720","messageId":"517C1B48.5090206@ramsay1.demon.co.uk","threadId":"33636","inReplyTo":null,"subject":"[PATCH 1/6] clone: Make the 'junk_mode' symbol a file static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-04-27T18:39:04Z","receivedAt":"2013-04-27T18:39:04Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSparse issues an \"'junk_mode' not declared. Should it be static?\"\nwarning. In order to suppress the warning, since this symbol does\nnot need more than file visibility, we simply add the static\nmodifier to it's declaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n builtin/clone.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/builtin/clone.c b/builtin/clone.c\nindex 58fee98..035ab64 100644\n--- a/builtin/clone.c\n+++ b/builtin/clone.c\n@@ -387,7 +387,7 @@ static void clone_local(const char *src_repo, const char *dest_repo)\n static const char *junk_work_tree;\n static const char *junk_git_dir;\n static pid_t junk_pid;\n-enum {\n+static enum {\n \tJUNK_LEAVE_NONE,\n \tJUNK_LEAVE_REPO,\n \tJUNK_LEAVE_ALL\n-- \n1.8.2\n"},{"id":"215772","messageId":"20130427232124.GA13800@sigill.intra.peff.net","threadId":"33636","inReplyTo":"517C1B48.5090206@ramsay1.demon.co.uk","subject":"Re: [PATCH 1/6] clone: Make the 'junk_mode' symbol a file static","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-04-27T23:21:25Z","receivedAt":"2013-04-27T23:21:25Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Apr 27, 2013 at 07:39:04PM +0100, Ramsay Jones wrote:\n\n> Sparse issues an \"'junk_mode' not declared. Should it be static?\"\n> warning. In order to suppress the warning, since this symbol does\n> not need more than file visibility, we simply add the static\n> modifier to it's declaration.\n> [...]\n> -enum {\n> +static enum {\n>  \tJUNK_LEAVE_NONE,\n\nThanks. This one was done by me, and yes it should be static. I think it\nis because I originally typed:\n\n  enum junk_mode {\n    ...\n  };\n  static enum junk_mode junk_mode;\n\nand then later dropped the named type, but forgot to keep the static\nkeyword.\n\n-Peff\n"},{"id":"215780","messageId":"CAPig+cSJujQ0qMMJ4+sqob_sTzPEokF81bjm69KFK5Ja+mCV8g@mail.gmail.com","threadId":"33636","inReplyTo":"517C1B48.5090206@ramsay1.demon.co.uk","subject":"Re: [PATCH 1/6] clone: Make the 'junk_mode' symbol a file static","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-04-28T01:55:40Z","receivedAt":"2013-04-28T01:55:40Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Sat, Apr 27, 2013 at 2:39 PM, Ramsay Jones\n<ramsay@ramsay1.demon.co.uk> wrote:\n> Sparse issues an \"'junk_mode' not declared. Should it be static?\"\n> warning. In order to suppress the warning, since this symbol does\n> not need more than file visibility, we simply add the static\n> modifier to it's declaration.\n\ns/it's/its/\n\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n"}]}