[patch] Error on setenv(..., NULL, ...)
Paul Pluzhnikov
ppluzhnikov@google.com
Mon Mar 16 01:10:00 GMT 2015
On Sun, Mar 15, 2015 at 5:42 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> I reverted it.
Thanks,
> Sorry about that; it had a horrible typo (!= vs ==).
Oh, right. I should have noticed.
> Does
> the attached (untested) patch work for you instead? It fixes the typo, and
> also pacifies GCC so that GCC does not issue the bogus warning.
I've tested the patch on Linux/x86_64. Looks good.
+/* Pacify GCC; see the commentary about VALLEN below. This is needed
+ at least through GCC 4.9.2. Pacify GCC for the entire file, as
+ there seems to be no way to pacify GCC selectively, only for the
+ place where it's needed. Do not use DIAG_IGNORE_NEEDS_COMMENT
+ here, as it's not defined yet. */
+#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
You can be more selective with '#pragma GCC diagnostic push/pop'
around the function.
Clearly you know about DIAG_IGNORE_NEEDS_COMMENT (I didn't), so I
assume you also know about DIAG_PUSH_NEEDS_COMMENT /
DIAG_POP_NEEDS_COMMENT, which then makes me not understand your
comment about selective pacification.
--
Paul Pluzhnikov
More information about the Libc-alpha
mailing list