Comments on: A Word of Warning! My favorite warnings: "sprintf is unsafe" - caused me to completely replace printf with something more smart. I love this approach to complain about CRT functions. Most of them are so scary inside (like ctime) nobody would want to use it if it wasnt on some rusty standart. My favorite warnings:
“sprintf is unsafe” – caused me to completely replace printf with something more smart.
I love this approach to complain about CRT functions. Most of them are so scary inside (like ctime) nobody would want to use it if it wasnt on some rusty standart.

]]>
By: Josh Simmons/2011/06/25/a-word-of-warning/#comment-6343 Josh Simmons Sun, 26 Jun 2011 04:11:35 +0000 Sometime it's easier to disable all warnings of a type. For example, VC's warning level 4 - they're all mostly useless. Also, if exceptions aren't used but STL/boost is, there's no point in leaving all those annoying STL exception warnings in the output. There were a few more warnings like that but generally it is indeed useful to see them. Especially the signed/unsigned comparison warnings. It would be otherwise so easy to make mistakes there... Sometime it’s easier to disable all warnings of a type. For example, VC’s warning level 4 – they’re all mostly useless. Also, if exceptions aren’t used but STL/boost is, there’s no point in leaving all those annoying STL exception warnings in the output. There were a few more warnings like that but generally it is indeed useful to see them. Especially the signed/unsigned comparison warnings. It would be otherwise so easy to make mistakes there…

]]>
By: Michael A. Carr-Robb-John/2011/06/25/a-word-of-warning/#comment-6329 Michael A. Carr-Robb-John Sat, 25 Jun 2011 15:39:31 +0000 I completely agree. I think the only way to properly deal with invalid warnings is through #pragma warning( push ) and #pragma warning( pop ), it's a little bit more work but warnings can be invaluable and disabling them globally or loosing them in a constant flood is equally bad. I completely agree. I think the only way to properly deal with invalid warnings is through #pragma warning( push ) and #pragma warning( pop ), it’s a little bit more work but warnings can be invaluable and disabling them globally or loosing them in a constant flood is equally bad.

]]>
By: Cam Jackson/2011/06/25/a-word-of-warning/#comment-6326 Cam Jackson Sat, 25 Jun 2011 14:24:27 +0000