make test compiles with warnings on gcc 5.4.0
mlabbe opened this issue · 1 comments
` $ make test
cc -o test_argparse.o -c -Wall -Wextra -fPIC -O3 -g -ggdb test_argparse.c
test_argparse.c: In function ‘main’:
test_argparse.c:28:9: warning: missing initializer for field ‘callback’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_BOOLEAN('f', "force", &force, "force to do"),
^
In file included from test_argparse.c:4:0:
argparse.h:80:24: note: ‘callback’ declared here
argparse_callback *callback;
^
test_argparse.c:29:9: warning: missing initializer for field ‘callback’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_BOOLEAN('t', "test", &test, "test only"),
^
In file included from test_argparse.c:4:0:
argparse.h:80:24: note: ‘callback’ declared here
argparse_callback *callback;
^
test_argparse.c:30:9: warning: missing initializer for field ‘callback’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_STRING('p', "path", &path, "path to read"),
^
In file included from test_argparse.c:4:0:
argparse.h:80:24: note: ‘callback’ declared here
argparse_callback *callback;
^
test_argparse.c:31:9: warning: missing initializer for field ‘callback’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_INTEGER('i', "int", &int_num, "selected integer"),
^
In file included from test_argparse.c:4:0:
argparse.h:80:24: note: ‘callback’ declared here
argparse_callback *callback;
^
test_argparse.c:32:9: warning: missing initializer for field ‘callback’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_FLOAT('s', "float", &flt_num, "selected float"),
^
In file included from test_argparse.c:4:0:
argparse.h:80:24: note: ‘callback’ declared here
argparse_callback *callback;
^
test_argparse.c:35:9: warning: missing initializer for field ‘flags’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_BIT(0, "write", &perms, "write perm", NULL, PERM_WRITE),
^
In file included from test_argparse.c:4:0:
argparse.h:82:9: note: ‘flags’ declared here
int flags;
^
test_argparse.c:36:9: warning: missing initializer for field ‘flags’ of ‘struct argparse_option’ [-Wmissing-field-initializers]
OPT_BIT(0, "exec", &perms, "exec perm", NULL, PERM_EXEC),
^
In file included from test_argparse.c:4:0:
argparse.h:82:9: note: ‘flags’ declared here
int flags;
^
cc -Wall -Wextra -fPIC -O3 -g -ggdb -o test_argparse argparse.o test_argparse.o
Unit Test
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
1..15`