On Tue, 13 Jan 2026 14:54:15 +1100
David Gibson
cppcheck-2.19.1 complains that the unusedFunction suppression in igmp.c doesn't match. That seems like a cppcheck bug, because the function clearly *is* unused. The function exists because otherwise the compiler fails because "ISO C forbids an empty translation unit".
mld.c contains an identical unused definition for the same reason, but without the suppression. It doesn't seem to have caused unusedFunction warnings, so maybe cppcheck counts the non-empty translation unit requirement as a "use" of the function?
No idea why, but with this patch and cppcheck 2.16.0 I'm getting: igmp.c:16:0: style: The function 'unused' is never used. [unusedFunction] __attribute__((__unused__)) static void unused(void) { } ^ ...I guess we needed one and exactly one suppression between mld.c and igmp.c, even though it's two different translation units. Anyway, whatever, it's too old to make sense. Upgraded to 2.19.0, no error there, I guess it should be good enough for everybody. -- Stefano