4 ms·
`-Wall` is your friend and boy it is a major irritant using third party sloppy libraries when statically compiling it all.
by warmwaffles 6mo ago
`-Wall` is your friend and boy it is a major irritant using third party sloppy libraries when statically compiling it all.
- inetknght 6mo agoBetter to turn every warning into an error.
- jcalvinowens 6mo agoFor releases! But have a flag to disable it: don't make people edit -Werror out while hacking, that's really annoying.
- fwip 6mo agoI'm actually a little horrified to learn that warnings were suppressed while developing code to control a 747.
- MisterTea 6mo agoAnd it took them a month to figure this out.
- usefulcat 6mo agoRight out of college, one of my first job offers was to work on the compiler for the computer for the Space Shuttle. Apparently because I had once taken a compiler course. Even young, naive, optimistic me thought to question the wisdom of that offer. I ended up not taking it because the pay wasn’t great (and at the time it wasn’t really what I wanted to do), but part of me is still curious about what that would have been like.
- yjftsjthsd-h 6mo agoThere are even more options you might also want to consider: https://stackoverflow.com/questions/73310403/whats-the-difference-between-wextra-and-pedantic-in-gcc#73310743 https://stackoverflow.com/questions/73310403/whats-the-diffe...
- deleted 6mo ago[deleted]
- m463 6mo agoThis is one of those things that is hard to do, but great to have done. It's hard to do with a codebase in flight with lots of people working on it. What I remember implementing this on projects was the messiness of: - incrementally getting the Makefiles to turn on -Wall file-by-file as they were scrubbed. I think it was something similar to "<list-of-files>: CFLAGS+=-Wall" and then add to the list. - suppressing warnings that were "ok" on a case-by-case basis. different languages had different ways of saying "ignore error 123 here" if at all. - I remember lint had things like this too, like /NOTREACHED/ maybe things have gotten better/cleaner.