|
|
Subscribe / Log in / New account

Catching the mismatch

Catching the mismatch

Posted Feb 11, 2025 13:05 UTC (Tue) by Wol (subscriber, #4433)
In reply to: Catching the mismatch by q3cpma
Parent article: Maintainer opinions on Rust-for-Linux

> Does it matter much? Such a real world case shouldn't happen often.

When I was programming in C regularly, it happened a lot, and it was a pain in the arse - the warnings swamped everything else.

As soon as you start using callbacks, passing functions to libraries, what have you (and it's libraries that are the problem, where the generic case needs the parameter but your case doesn't), you want to be able to say "I know this variable isn't used, it's there for a reason".

This was Microsoft C6 with warning level 4, and I just couldn't find a way to suppress a warning - everything I tried might suppress the warning I was trying to get rid of, but just triggered a different warning instead.

Fortunately, it was me that set the rules about errors, warnings etc, so the rule basically said "all warnings must be fixed or explained away".

Cheers,
Wol


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds