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

[PATCH] test-generation.c: Fix a compiler warning

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Sep 15, 2012, 16:12 UTC
Message-ID
<5054A909.1070104@ramsay1.demon.co.uk>
gcc complains as follows:
        CC test-generation.o
    test-generation.c: In function `main':
    test-generation.c:105: warning: control reaches end of \
        non-void function

In order to suppress the warning, we simply add a suitable return statement to main().

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Junio,

Could you please squash this into commit 1784d096 ("test-generation: compute generation numbers and clock skews", 04-09-2012).

Thanks!

ATB, Ramsay Jones

 test-generation.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/test-generation.c b/test-generation.c
index 4df5a0d..de87f2b 100644
--- a/test-generation.c
+++ b/test-generation.c
@@ -102,4 +102,5 @@ int main(int ac, const char **av)
 
 		show_commit(commit, gd);
 	}
+	return 0;
 }
-- 
1.7.12
Message 1 of 1 in “test-generation.c: Fix a compiler warning”
  1. test-generation.c: Fix a compiler warningRamsay Jones, Sep 15, 2012

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.