Hacker News new | ask | show | jobs
by johnisgood 543 days ago
Yeah, in C, you at least add the unused attribute and can grep for it. In some languages that do not support "_" prefix or the attribute meaning unused, you have to comment out parts. It is really annoying and I think it is worse.

In some C code where I have to suppress an unused variable warning (for example to a pthread callback), I just do (void)arg at the top of the function.