threads / patch / 31542

patchtest-generation.c: Fix a compiler warning

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

## tl;dr

One message between Sep 15, 2012 and Sep 15, 2012. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Ramsay Jones· Sep 15, 2012, 16:12 UTC · lore
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(+)
Show changes to test-generation.c +1 −0
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

← back to recent threads