waf: compiler flags, uninitalized variable

Hal Murray halmurray at sonic.net
Fri Aug 1 18:54:32 UTC 2025


> The other thing I forgot to mention is that sometimes the control-flow
> analysis isn't as good in older compilers, leading to complaints about
> something being used uninitialized in a case where the code couldn't
> actually be reached in the unininitialized case.  Unless there's a good
> reason to avoid it, usually the best fix is just to add an initializer to
>  the declaration, even if it's not logically necessary. 

I usually add a "keep compiler happy" comment to that sort of code.

If I see that sort of code without a comment, I looking for it.

The example that started this thread was really simple.

-- 
These are my opinions.  I hate spam.





More information about the devel mailing list