Inactive Tutor answered 3d
Tutor
New to Wyzant
In C, the most portable way to do that is to call the parameter, but cast the value to void.
Bool NullFunc(const struct timespec *when, const char *who) {
(void)when;
(void)who;
return TRUE;
}
As a side note, in C++17 onward, you can use the [[maybe_unused]] attribute:
bool NullFunc([[maybe_unused]] const struct timespec *when,
[[maybe_unused]] const char *who) {
return TRUE;
}