I can see someone, later, modifying some_fn() to actually modify the string in some way (after all, according to the 'contract', you should be safe to do that).
Still, you're getting warnings right now, not errors. The warnings are there to point out that something is wrong, and you should fix it... *before* you find yourself with a compiler error in some future version (when you turn off compatibility or whatever).
At least the compiler writers recognize what they're doing, and are trying to give you some kind of a rope (not so much to hang yourself with, as to repair the issue).
Yes, sometimes I *really* and *legitimately* don't care about the return value of a system call, because the program's subsequent behavior would be the same either way. I don't want the compiler to play holier-than-thou and insist that I need to handle the return value.
Can you not adjust the compiler warning threshold, as you can with a Windows compiler?
(sorry, I meant a 'Microsoft' compiler)
Apr 21 2009 6:48am from fleeb @uncnsrd
Well, another way of seeing it is that this exposes a lurking error in your
Like zombies? Oh, you said error not terror
In VC++, there's a pragma to ignore a compiler warning on a per-issue basis.
It'd be nice if such a thing existed for all compilers... but also kind of annoying.
Heh... yea, error.
I get warnings about assigned vars that never get read from, that makes sense, but you shouldn't be required to act on a return value.
once I had funny troubles with a borland C and assembler routines with the coprocessor.
the program would crash in that assembler routine due to some uncertain precondition...
after searching about a day I found a function returning a real value where a return was missing.
just a warning...
from that day on we had a zero warning policy.
Oh, I've heard of that, it's called "Java".
He's right, but I'm more leaning toward, well, if you're not doing anything serious anyway, so you write it in java...
me chooses bash or php for non-serious coding.
Java is just a more serious web language than PHP, although it is not as serious as, say, assembler.
Java is just a more serious web language than PHP, although it is not
as serious as, say, assembler.
Nothing is as serious as assembler.
Except, I suppose typing in the hex yourself.