gallium/auxiliary/util/u_debug.h: Fix "noreturn" warnings in debug mode

Only decorate function as noreturn when DEBUG is not defined, because
when compiled in DEBUG mode the function actually executes an int3 and
may return, fixes:
u_debug.c: In function '_debug_assert_fail':
u_debug.c:309:1: warning: 'noreturn' function does return

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 6 years ago committed by Jakob Bornecrantz
parent 9ddf5081a6
commit 52844995a6
  1. 4
      src/gallium/auxiliary/util/u_debug.h

@ -164,8 +164,8 @@ void _debug_assert_fail(const char *expr,
const char *file, const char *file,
unsigned line, unsigned line,
const char *function) const char *function)
#ifdef __GNUC__ #if defined(__GNUC__) && !defined(DEBUG)
__attribute__((__noreturn__)) __attribute__((noreturn))
#endif #endif
; ;

Loading…
Cancel
Save