limit -Wmaybe-uninitialized suppression to gcc >= 4.3
apple gcc 4.2 complains about the use of the pragma inside a function. clang also complains, but because the pragma is entirely unknown to it. as neither compiler emits the bogus warning in the first place, there is no point in suppressing it anyway.
This commit is contained in:
parent
5aab050198
commit
094af8720c
|
@ -519,13 +519,13 @@ map_name( const char *arg, char **result, int reserve, const char *in, const cha
|
||||||
for (ll = 0; ll < inl; ll++)
|
for (ll = 0; ll < inl; ll++)
|
||||||
if (arg[i + ll] != in[ll])
|
if (arg[i + ll] != in[ll])
|
||||||
goto rnexti;
|
goto rnexti;
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__clang__)
|
||||||
# pragma GCC diagnostic push
|
# pragma GCC diagnostic push
|
||||||
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145 */
|
/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145 */
|
||||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||||
#endif
|
#endif
|
||||||
memcpy( p, out, outl );
|
memcpy( p, out, outl );
|
||||||
#ifdef __GNUC__
|
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) && !defined(__clang__)
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
p += outl;
|
p += outl;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user