4 ms·
-Werror used to be the way to go, until compiler writers decided to add warnings for idiotic reasons. Like 'confusing indentation' or 'unused static const vari
by buserror 10y ago
-Werror used to be the way to go, until compiler writers decided to add warnings for idiotic reasons.
Like 'confusing indentation' or 'unused static const variables'.
Seriously, these two are completely idiotic; why would the compiler decide that the fact I don't have a blank line 'might' be confusing? on whose criteria?
Same with static const variables in C files. Lots of code is often #ifdef in/out, and lots of people would rather have a static const int than a #define!
- mattkrause 10y agoThe "confusing indentation" warning can be useful. For example, it would have flagged if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) goto fail; goto fail; Does any compiler try to indicate the severity of each warning. For example, using the value from an uninitialized variable is labeled as somehow "worse" than code-quality warnings like indentation or bare assignments inside conditionals?