In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments.
int func(); 改成 int func(void);
参考:
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype