27 Mar, 2009, Igabod wrote in the 21st comment:
Votes: 0
ah, thanks fizban I sorta knew that but wasn't sure.
27 Mar, 2009, Tyche wrote in the 22nd comment:
Votes: 0
elanthis said:
Furthermore, warnings are there for a reason. Fix them.


warn.c:6: warning: suggest parentheses around assignment used as truth value
warn.c:6: warning: suggest explicit braces to avoid ambiguous 'else'

And sometimes the compiler needs to be told to shut up. ;-)
27 Mar, 2009, Igabod wrote in the 23rd comment:
Votes: 0
no, even there the compiler is telling you that you used bad form. Every message it gives you is useful and needs to be corrected, I'd have expected you to be of the same opinion Tyche.
27 Mar, 2009, elanthis wrote in the 24th comment:
Votes: 0
srsly. every single time I've seen either of those warnings it actually saved my ass, because I actually did need parenthesis around an expression or I actually did have the 'else' binding to the wrong 'if'. (I spent almost two hours banging my head on my desk over that issue in another language that has no grammar warnings – or other useful debugging tools – because the 'else' was indented to the level of the inner 'if' but was binding to the outer 'if', and my eyes just weren't noticing the lack of braces.)

The only warning I see on a frequent basis that is (mostly) garbage is the signed vs unsigned comparison warnings in loop control expressions. The warning is technically valid, but in practice just a waste of my time. Oddly, now that I think about it, I haven't seen one of those in a while… either my coding habits have changed or GCC got less whiny about those.
27 Mar, 2009, David Haley wrote in the 25th comment:
Votes: 0
elanthis said:
(I spent almost two hours banging my head on my desk over that issue in another language that has no grammar warnings – or other useful debugging tools – because the 'else' was indented to the level of the inner 'if' but was binding to the outer 'if', and my eyes just weren't noticing the lack of braces.)

MMmmmmm, smells like Python. :tongue:

elanthis said:
The only warning I see on a frequent basis that is (mostly) garbage is the signed vs unsigned comparison warnings in loop control expressions. The warning is technically valid, but in practice just a waste of my time. Oddly, now that I think about it, I haven't seen one of those in a while… either my coding habits have changed or GCC got less whiny about those.

In my case at least it's definitely the case that I've gotten rather particular about signed vs. unsigned due to the compiler warnings…
27 Mar, 2009, Igabod wrote in the 26th comment:
Votes: 0
I don't get those warnings and I know nothing about the difference between signed and unsigned, nor do I know when it's proper to use which one. My guess is that the compiler is less picky since I'm just not that lucky.
27 Mar, 2009, Tyche wrote in the 27th comment:
Votes: 0
There's nothing ambiguous about else in C. And assignment in conditionals is a C idiom.
Yes the signed/unsigned warnings in comparisons is also annoying.
27 Mar, 2009, Igabod wrote in the 28th comment:
Votes: 0
I still find it better to make it so my code won't generate any warnings at all, whether or not those particular warnings are retarded.
27 Mar, 2009, Tyche wrote in the 29th comment:
Votes: 0
Igabod said:
I still find it better to make it so my code won't generate any warnings at all, whether or not those particular warnings are retarded.


I bet your code is full of warnings.
Try turning them on with -Wall -W
;-)
27 Mar, 2009, Kayle wrote in the 30th comment:
Votes: 0
Tyche said:
Igabod said:
I still find it better to make it so my code won't generate any warnings at all, whether or not those particular warnings are retarded.


I bet your code is full of warnings.
Try turning them on with -Wall -W
;-)


Curiosity got the better of me, so I grabbed a copy of the LOW4_Fixup from the Repository, and after ripping out the colorfulness of the makefile I applied the flags we use for working on SmaugFUSS: -Wall -Werror -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls

With -Werror I couldn't get past the first file. So I took it off to see if I could even get to the end. The result is here.

[Edit:] Also of note, I had to log the session in SecureCRT because the 128,000 line scrollback buffer limit prevented me from getting to the top of the compile for a copy/paste.
27 Mar, 2009, Igabod wrote in the 31st comment:
Votes: 0
Ah… I have -Wall -W -Werror on my personal mud but none of the others, thank you for giving me a huge project to work on. I wasn't aware that there were any warnings turned off.

I decided to try adding all those flags to my personal mud and it compiles with no warnings at all with -Wall -W -Werror -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls all turned on.

The only reason the low4_fixup has those problems is because I only spent a couple days removing the obvious errors and warnings with just -Wall turned on. Though I'll get to work on fixing it with all of those others turned on as well since I know about them now. Kinda weird that I somehow fixed all those problems on my own mud without even knowing about them.

[edit to add]Ah damn, I hate when I do something stupid like this, I put those on the commented out line of my makefile, I was totally incorrect. I'll get to work fixing these problems on my mud first, then the fixup release.
20.0/31