Is there a way to prevent the unused parameter warning from appearing on the C code? For example,
Bool NullFunc(const struct timespec *when, const char *who, unsigned short format, void *data, int len)
{
return TRUE;
}
In C++, /.../ could be used in the parameter to annotate
C says error: parameter name selected
-,-
Please don't let this pop up
gcc c warning
You don't want to erase unused parameters? Then we usually use macros to process it.
#define UNUSED(x) (void)(x)
For example:
void f(int x) {
UNUSED(x);
...
}
© 2024 OneMinuteCode. All rights reserved.