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

[PATCH 3/7] missing 'static' keywords

From
Pierre Habouzit <madcoder@debian.org>
Date
Aug 23, 2006, 10:39 UTC
Message-ID
<1156329556788-git-send-email-madcoder@debian.org>
In-Reply-To
<11563295562422-git-send-email-madcoder@debian.org>
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 builtin-tar-tree.c |    2 +-
 http-push.c        |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-tar-tree.c b/builtin-tar-tree.c
index e0bcb0a..61a4135 100644
--- a/builtin-tar-tree.c
+++ b/builtin-tar-tree.c
@@ -275,7 +275,7 @@ static void traverse_tree(struct tree_de
 	}
 }
 
-int git_tar_config(const char *var, const char *value)
+static int git_tar_config(const char *var, const char *value)
 {
 	if (!strcmp(var, "tar.umask")) {
 		if (!strcmp(value, "user")) {
diff --git a/http-push.c b/http-push.c
index 4849779..7d12f69 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1700,7 +1700,7 @@ static int locking_available(void)
 	return lock_flags;
 }
 
-struct object_list **add_one_object(struct object *obj, struct object_list **p)
+static struct object_list **add_one_object(struct object *obj, struct object_list **p)
 {
 	struct object_list *entry = xmalloc(sizeof(struct object_list));
 	entry->item = obj;
-- 
1.4.1.1
Previous: Pierre HabouzitNext: Pierre Habouzit
Message 3 of 7 in “avoid to use error that shadows the function name, use err instead.”
  1. 1/7 avoid to use error that shadows the function name, use err instead.Pierre Habouzit, Aug 23, 2006
  2. 2/7 git_dir holds pointers to local strings, hence MUST be const.Pierre Habouzit, Aug 23, 2006
  3. 3/7 missing 'static' keywordsPierre Habouzit, Aug 23, 2006
  4. 4/7 remove ugly shadowing of loop indexes in subloops.Pierre Habouzit, Aug 23, 2006
  5. 5/7 missing #define DEBUG 0 that made the preprocessor whinePierre Habouzit, Aug 23, 2006
  6. 6/7 use name[len] in switch directly, instead of creating a shadowed variable.Pierre Habouzit, Aug 23, 2006
  7. 7/7 n is in fact unused, and is later shadowed.Pierre Habouzit, Aug 23, 2006

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.