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>
This commit is contained in:
Nicolas Viennot 2019-12-21 18:13:06 +00:00 committed by Andrei Vagin
parent 8bb3c17a0f
commit 17c4a8b245
41 changed files with 101 additions and 100 deletions

View file

@ -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;

View file

@ -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"