On Fri, 1 Aug 2025, Hal Murray wrote:

devel@ntpsec.org said:
Usually, you won't get that type of warning unless you enable it.  And
usually, you only get that type of warning in an optimized compile, since
 the dataflow analysis needed to detect it is part of the optimization
code.

I tried O3.  That found a different maybe-uninitialized.

I tried O6.  Nothing new.

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.

Fred Wright
_______________________________________________
devel mailing list
devel@ntpsec.org
https://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to