5 ms·
And at the same time, while the development team is having fun with the blame game, somebody is waiting for a build that never comes! At least do it the right
by to3m 11y ago
And at the same time, while the development team is having fun with the blame game, somebody is waiting for a build that never comes!
At least do it the right way round: developer machines build with -Werror, and build PC should build without. (Selective "promotion" to errors is a good idea on top of that.) That way, it's not the end of the world if people check something in that doesn't build cleanly, because they disabled -Werror on their local copy in order to get some debugging done without having to play whack-a-mole as they did so.
(Obviously, they're not supposed to do that. But ideally they wouldn't be doing any debugging in the first place, either. These things happen, and processes should be designed around that.)
Not all warnings are equal, and -Werror doesn't give you any discretion. You probably want to be kept abreast of unused functions, unused variables, unused parameters, int-to-bool casts, truncation of double literals, and so on - but they're poor justifications for stopping the build. You don't need to hold the build to ransom to get it to compile without warnings. All you need to do is take the warnings out.
- SamReidHughes 11y agoI've never had big blocking problems like that with -Werror on all the time. You get one? Fix it and move on. When you have a large enough organization or enough different compiler versions at play, disable the specific warnings that seem to get you in trouble between compiler versions.
- MereInterest 11y agoNot all warnings are equal, but all warnings get printed to screen. If there are heaps and loads of ignoreable warnings, then I can't tell whether somewhere in that mess is a warning that I should be paying more attention to. Better to have a policy that no warnings should occur.
- to3m 11y agoI'm not saying they shouldn't be fixed. They should. They just don't need to be errors.