3 ms·
This example is C++, not C. Clang is complaining because it's good practice to declare a prototype for a non-static function (in a header file) before using or
by rossy 9y ago
This example is C++, not C. Clang is complaining because it's good practice to declare a prototype for a non-static function (in a header file) before using or declaring the function itself, so it can't accidentally be used with the wrong parameter list in a different compilation unit. It will produce this warning if you have () or (void) as the parameter list.