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

[PATCH 1/6] config.c: Fix a sparse warning

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Oct 6, 2013, 20:48 UTC
Message-ID
<5251CC9D.9040309@ramsay1.demon.co.uk>

Sparse issues an "'git_parse_unsigned' was not declared. Should it be static?" warning. In order to suppress this warning, since this symbol only requires file scope, we simply add the static modifier to its declaration.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 6588cf5..e1d66a1 100644
--- a/config.c
+++ b/config.c
@@ -498,7 +498,7 @@ static int git_parse_signed(const char *value, intmax_t *ret, intmax_t max)
 	return 0;
 }
 
-int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max)
+static int git_parse_unsigned(const char *value, uintmax_t *ret, uintmax_t max)
 {
 	if (value && *value) {
 		char *end;
-- 
1.8.4
Next: Jeff King
Message 1 of 2 in “config.c: Fix a sparse warning”
  1. 1/6 config.c: Fix a sparse warningRamsay Jones, Oct 6, 2013
  2. Jeff KingOct 7, 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.