diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-04-04 02:06:16 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-04-04 02:06:16 +0200 |
commit | e8ef51b171a79e558651b98be5c7a64c75354098 (patch) | |
tree | 604e2bc61bfb3b590bdbb554bb2432de71c513f3 /hurd | |
parent | cd104f4ff43fed06aed9069cf662c4a5bc2ffbc0 (diff) | |
download | glibc-e8ef51b171a79e558651b98be5c7a64c75354098.tar.gz glibc-e8ef51b171a79e558651b98be5c7a64c75354098.tar.xz glibc-e8ef51b171a79e558651b98be5c7a64c75354098.zip |
hurd: Silence warning
* hurd/hurdsig.c (interrupted_reply_port_location): Use DIAG_IGNORE_NEEDS_COMMENT to silence warning with GCC 6 and before.
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/hurdsig.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c index 31e8d336e3..6b73dcdbf3 100644 --- a/hurd/hurdsig.c +++ b/hurd/hurdsig.c @@ -33,6 +33,8 @@ #include "hurdmalloc.h" /* XXX */ #include "../locale/localeinfo.h" +#include <libc-diag.h> + const char *_hurdsig_getenv (const char *); struct mutex _hurd_siglock; @@ -246,8 +248,14 @@ interrupted_reply_port_location (thread_t thread, /* Faulted trying to read the TCB. */ return NULL; + DIAG_PUSH_NEEDS_COMMENT; + /* GCC 6 and before seem to be confused by the setjmp call inside + _hurdsig_catch_memory_fault and think that we may be returning a second + time to here with portloc uninitialized (but we never do). */ + DIAG_IGNORE_NEEDS_COMMENT (6, "-Wmaybe-uninitialized"); /* Fault now if this pointer is bogus. */ *(volatile mach_port_t *) portloc = *portloc; + DIAG_POP_NEEDS_COMMENT; if (sigthread) _hurdsig_end_catch_fault (); |