r/ProgrammerHumor • • 18h ago

Meme checkBuildSettings

Post image
3.0k Upvotes

69 comments sorted by

View all comments

Show parent comment

7

u/Prawn1908 3h ago

Exactly. Warnings either get corrected or locally suppressed with a comment right above the #pragma explaining exactly why it's safe.

8

u/PrincessRTFM 3h ago

my favourite is the way rust does it: #[expect(whatever)] will emit a warning if no warning of category whatever is emitted. if you refactor things and that warning is no longer relevant, you need to remove the suppression, and using expect instead of allow is perfect for that.