diff options
author | Nicolas Viennot <Nicolas.Viennot@twosigma.com> | 2019-12-21 21:13:06 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@gmail.com> | 2020-02-04 23:39:42 +0300 |
commit | 17c4a8b24507d1bd1a906aa4a9d5ea3054072141 (patch) | |
tree | d2f11a35430548513c210ab05d1d7b6f9772374f /soccr | |
parent | 8bb3c17a0f7f14baaed8d9b6ebf953c24a793ccc (diff) |
style: Enforce kernel style -Wstrict-prototypes
Include warnings that the kernel uses during compilation:
-Wstrict-prototypes: enforces full declaration of functions.
Previously, when declaring extern void func(), one can call func(123)
and have no compilation error. This is dangerous. The correct declaration
is extern void func(void).
Signed-off-by: Nicolas Viennot <Nicolas.Viennot@twosigma.com>
[Generated a commit message from the pull request]
Signed-off-by: Dmitry Safonov <dima@arista.com>
Diffstat (limited to 'soccr')
-rw-r--r-- | soccr/test/tcp-conn.c | 2 | ||||
-rw-r--r-- | soccr/test/tcp-constructor.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/soccr/test/tcp-conn.c b/soccr/test/tcp-conn.c index 1a1a5bb39..e31f58e7e 100644 --- a/soccr/test/tcp-conn.c +++ b/soccr/test/tcp-conn.c @@ -23,7 +23,7 @@ static void pr_printf(unsigned int level, const char *fmt, ...) va_end(args); } -int main() +int main(void) { union libsoccr_addr addr, dst; int srv, sock, clnt, rst; diff --git a/soccr/test/tcp-constructor.c b/soccr/test/tcp-constructor.c index 89f201000..973dbf10c 100644 --- a/soccr/test/tcp-constructor.c +++ b/soccr/test/tcp-constructor.c @@ -20,7 +20,7 @@ struct tcp { uint16_t wscale; }; -static void usage() +static void usage(void) { printf( "Usage: --addr ADDR -port PORT --seq SEQ --next --addr ADDR -port PORT --seq SEQ -- CMD ...\n" |