This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Error on setenv(..., NULL, ...)
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Roland McGrath <roland at hack dot frob dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Joseph Myers <joseph at codesourcery dot com>, GLIBC Devel <libc-alpha at sourceware dot org>, "mtk at man7 dot org" <mtk at man7 dot org>
- Date: Sun, 15 Mar 2015 18:10:09 -0700
- Subject: Re: [patch] Error on setenv(..., NULL, ...)
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobNSbWUkd_i-L6U0ovbqPYnJY-h=ftX1K61yb19pmJj6aw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1503111712240 dot 30954 at digraph dot polyomino dot org dot uk> <CALoOobPKxfJfnbcUKH8osgCZMeSiD83K1OiF+_vSeAy0ewe1Jw at mail dot gmail dot com> <55008721 dot 1090200 at arm dot com> <CALoOobNbOgm5=oFbEUmTbca3M-KqSUgGmTeWYOt1zTN-CTLoog at mail dot gmail dot com> <55008DE0 dot 8050805 at cs dot ucla dot edu> <20150312215314 dot 1B7CC2C3B8E at topped-with-meat dot com> <55021AB7 dot 1060905 at cs dot ucla dot edu> <20150313170436 dot BF4C92C3B3B at topped-with-meat dot com> <55031BC3 dot 6070709 at cs dot ucla dot edu> <CALoOobMF_eRjg93DDfkTtcyrvCrHBYX8w3CaPU-R62cpOqbiMg at mail dot gmail dot com> <CALoOobO79BAzDZuq3=KJ=DnhVeu7np=W5kthdZrHEG5U1f2k4A at mail dot gmail dot com> <CALoOobNJ2wGtAn=LRwfLFR7o8idxg4+Lgz=jWo08Dxdj_BOHvA at mail dot gmail dot com> <55062712 dot 4040104 at cs dot ucla dot edu>
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
- References:
- [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)