git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/6] clone: Make the 'junk_mode' symbol a file static

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Apr 27, 2013, 18:39 UTC
Message-ID
<517C1B48.5090206@ramsay1.demon.co.uk>

Sparse issues an "'junk_mode' not declared. Should it be static?" warning. In order to suppress the warning, since this symbol does not need more than file visibility, we simply add the static modifier to it's declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 builtin/clone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/clone.c b/builtin/clone.c
index 58fee98..035ab64 100644
--- a/builtin/clone.c
+++ b/builtin/clone.c
@@ -387,7 +387,7 @@ static void clone_local(const char *src_repo, const char *dest_repo)
 static const char *junk_work_tree;
 static const char *junk_git_dir;
 static pid_t junk_pid;
-enum {
+static enum {
 	JUNK_LEAVE_NONE,
 	JUNK_LEAVE_REPO,
 	JUNK_LEAVE_ALL
-- 
1.8.2
Next: Jeff King
Message 1 of 3 in “clone: Make the 'junk_mode' symbol a file static”
  1. 1/6 clone: Make the 'junk_mode' symbol a file staticRamsay Jones, Apr 27, 2013
  2. Jeff KingApr 27, 2013
  3. Eric SunshineApr 28, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.