error: function declaration isn’t a prototype [-Werror=strict-prototypes]

"warning: function declaration isn't a prototype" was caused by the function like that:
 
return_type XXX()
{
.......
}
 
Please just modify the input paramter to void.return_type XXX(void)
{
.......
}
Or turn off the warning with -Wno-strict-prototypes (or simply by omitting -Wstrict-prototypes).
原文地址:https://www.cnblogs.com/cenglinjinran/p/4532775.html