Skip to content

Commit 6101f67

Browse files
committed
Fix function without prototype
I'm not sure why this is considered a function without prototype, but in C function without arguments accept any number of arguments. In this case we want a function that does not accept arguments so we need to use (void). cli.c:64:26: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] 64 | static void print_version() { puts(VERSION); } | ^ | void Signed-off-by: Nir Soffer <[email protected]>
1 parent d7aba7a commit 6101f67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static void print_usage(const char *argv0) {
6161
printf("version: " VERSION "\n");
6262
}
6363

64-
static void print_version() { puts(VERSION); }
64+
static void print_version(void) { puts(VERSION); }
6565

6666
enum {
6767
CLI_OPT_SOCKET_GROUP = CHAR_MAX + 1,

0 commit comments

Comments
 (0)