hurd: Silence warning
* hurd/hurdsig.c (interrupted_reply_port_location): Use DIAG_IGNORE_NEEDS_COMMENT to silence warning with GCC 6 and before.
This commit is contained in:
parent
cd104f4ff4
commit
e8ef51b171
|
@ -37,6 +37,8 @@
|
||||||
|
|
||||||
* sysdeps/mach/hurd/if_index.c (__if_nametoindex): Return ENODEV if
|
* sysdeps/mach/hurd/if_index.c (__if_nametoindex): Return ENODEV if
|
||||||
ifname is too long.
|
ifname is too long.
|
||||||
|
* hurd/hurdsig.c (interrupted_reply_port_location): Use
|
||||||
|
DIAG_IGNORE_NEEDS_COMMENT to silence warning with GCC 6 and before.
|
||||||
|
|
||||||
2018-04-03 Wilco Dijkstra <wdijkstr@arm.com>
|
2018-04-03 Wilco Dijkstra <wdijkstr@arm.com>
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
#include "hurdmalloc.h" /* XXX */
|
#include "hurdmalloc.h" /* XXX */
|
||||||
#include "../locale/localeinfo.h"
|
#include "../locale/localeinfo.h"
|
||||||
|
|
||||||
|
#include <libc-diag.h>
|
||||||
|
|
||||||
const char *_hurdsig_getenv (const char *);
|
const char *_hurdsig_getenv (const char *);
|
||||||
|
|
||||||
struct mutex _hurd_siglock;
|
struct mutex _hurd_siglock;
|
||||||
|
@ -246,8 +248,14 @@ interrupted_reply_port_location (thread_t thread,
|
||||||
/* Faulted trying to read the TCB. */
|
/* Faulted trying to read the TCB. */
|
||||||
return NULL;
|
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. */
|
/* Fault now if this pointer is bogus. */
|
||||||
*(volatile mach_port_t *) portloc = *portloc;
|
*(volatile mach_port_t *) portloc = *portloc;
|
||||||
|
DIAG_POP_NEEDS_COMMENT;
|
||||||
|
|
||||||
if (sigthread)
|
if (sigthread)
|
||||||
_hurdsig_end_catch_fault ();
|
_hurdsig_end_catch_fault ();
|
||||||
|
|
Loading…
Reference in New Issue