3 ms·
We can also silence -Wunused-perameter by omitting the parameter name in the prototype. No clutter, I'm personally fairly happy with this solution. (Note: the d
by loup-vaillant 3y ago
We can also silence -Wunused-perameter by omitting the parameter name in the prototype. No clutter, I'm personally fairly happy with this solution. (Note: the declaration in the header can sill name the parameter, it won't bring the warning back.)
- ludocode 3y agoThat's only in C++. As far as I know in C you need to name all parameters (although maybe that rule has been relaxed in newer versions of C.)
- flohofwoe 3y agoC23 finally relaxes that rule: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2510.pdf https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2510.pdf (although some C compilers already allowed it in non-pedantic mode)