-
Ben Pfaff authored
AC_LANG_PROGRAM(,) uses a program like this: int main() { return 0; } but that triggers warnings for -Wstrict-prototypes and for -Wold-style-definition, since this definition of main() lacks a prototype and is therefore old-style. This meant that -Wstrict-prototypes and -Wold-style-definition weren't being turned on for new-enough GCC. This commit fixes the problem by changing the program that is test-compiled to: int x; which doesn't make any compilers mad, as far as I know. I recently upgraded to GCC 6.1 and just now noticed the issue, so I think that GCC somewhere between version 4.9 and version 6.1 must have started warning about main() when it's declared this way. Also, fix a few functions that lacked prototypes. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
37f4615e