# [PATCH] clean: use f(void) instead of f() to declare a pointer to a function without arguments

1 messages from 2014-08-16 to 2014-08-16. Participants: René Scharfe.
Thread: https://gitlist.dev/t/37358

## René Scharfe, 2014-08-16 11:16

Subject: [PATCH] clean: use f(void) instead of f() to declare a pointer to a function without arguments
Message-ID: <53EF3DA8.7040605@web.de>
URL: https://gitlist.dev/e/53EF3DA8.7040605%40web.de

```
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

```
