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

[PATCH] sparse fix: non-ANSI function declaration

From
Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Nov 18, 2006, 12:07 UTC
Message-ID
<455EF76A.5070705@lsrfire.ath.cx>
The declaration of discard_cache() in cache.h already has its "void".
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 index-pack.c |    2 +-
 read-cache.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/index-pack.c b/index-pack.c
index 042aea8..8331d99 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -90,7 +90,7 @@ static SHA_CTX input_ctx;
 static int input_fd, output_fd, mmap_fd;
 
 /* Discard current buffer used content. */
-static void flush()
+static void flush(void)
 {
 	if (input_offset) {
 		if (output_fd >= 0)
diff --git a/read-cache.c b/read-cache.c
index 97c3867..0f5fb5b 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -844,7 +844,7 @@ unmap:
 	die("index file corrupt");
 }
 
-int discard_cache()
+int discard_cache(void)
 {
 	int ret;
 
-- 
1.4.4
Message 1 of 1 in “sparse fix: non-ANSI function declaration”
  1. sparse fix: non-ANSI function declarationRene Scharfe, Nov 18, 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.