The warning is technically correct. The usage is actually safe, but only by an implied API contract¹, and there’s no way to inform the compiler that a particular case is safe.
This makes the -Wmaybe-uninitialized warning pretty useless, but unfortunately it’s implied by -Wall in recent versions of GCC. However, we don’t seem to be using -Wall for Windows builds. In any case, I suggest suppressing the error with -Wno-maybe-uninitialized (or #pragma GCC diagnostic ignored "-Wmaybe-uninitialized" in the affected files).
¹ Specifically, the helpers used by OOJS_RETURN_WITH_HELPER() may never read from jsresult, and must write to it if returning YES.
I checked out a fresh copy of trunk and did a few make tests with the new flags for optimization (SSE2). What I found was that -O2 and -Os doesn't show those warnings whereas -O3, -Ofast and -O4 (ObjC only)* does.
Just for the record, I can confirm that -Ofast does generate the warnings Tricky gets also on my system. I don't know how I managed to miss them when I was building the experimental SSE2 version. Tricky, sorry if I made you donwload/re-install stuff for no good reason.
Just for the record, I can confirm that -Ofast does generate the warnings Tricky gets also on my system. I don't know how I managed to miss them when I was building the experimental SSE2 version. Tricky, sorry if I made you donwload/re-install stuff for no good reason.
It's OK. Every so often I do a clean checkout of various projects to make sure my builds are properly up to date.