git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clean: use f(void) instead of f() to declare a pointer to a function without arguments
@ 2014-08-16 11:16 René Scharfe
  0 siblings, 0 replies; only message in thread
From: René Scharfe @ 2014-08-16 11:16 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

Explicitly state that menu_item functions like clean_cmd don't take
any arguments by using void instead of an empty parameter list.

Found using gcc -Wstrict-prototypes.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
 builtin/clean.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/clean.c b/builtin/clean.c
index 1032563..3beeea6 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -67,7 +67,7 @@ struct menu_item {
 	char hotkey;
 	const char *title;
 	int selected;
-	int (*fn)();
+	int (*fn)(void);
 };
 
 enum menu_stuff_type {
-- 
2.1.0

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-16 11:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-16 11:16 [PATCH] clean: use f(void) instead of f() to declare a pointer to a function without arguments René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).