Simon Ser on Nostr: Reposting a GitLab comment I wrote about -Werror, because it seems like it's a hot ...
Reposting a GitLab comment I wrote about -Werror, because it seems like it's a hot take. Am I a crazy person?
I've been enabling -Werror by default on all my projects since basically forever and I've only seen positive outcomes.
Warnings are not meant to be ignored. They almost certainly indicate that something is broken. For instance, calling a non-existing function is -Wmissing-prototypes. The set of warnings triggered depend on a lot of things, including the exact OS, libraries, compiler, enabled features, etc. A CI can't possibly catch all of the combinations.
Users will report when a new warning breaks the build, and then the developers or the user can send a patch to fix it. Users can easily turn off -Werror if they want/need to.
I've been enabling -Werror by default on all my projects since basically forever and I've only seen positive outcomes.
Warnings are not meant to be ignored. They almost certainly indicate that something is broken. For instance, calling a non-existing function is -Wmissing-prototypes. The set of warnings triggered depend on a lot of things, including the exact OS, libraries, compiler, enabled features, etc. A CI can't possibly catch all of the combinations.
Users will report when a new warning breaks the build, and then the developers or the user can send a patch to fix it. Users can easily turn off -Werror if they want/need to.