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
Signed-off-by: Gert Wollny <gert.wol...@collabora.com> --- src/gallium/auxiliary/util/u_debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index d2ea89f59c..4c3b8ba171 100644 --- a/src/gallium/auxiliary/util/u_debug.h +++ b/src/gallium/auxiliary/util/u_debug.h @@ -170,8 +170,8 @@ void _debug_assert_fail(const char *expr, const char *file, unsigned line, const char *function) -#ifdef __GNUC__ - __attribute__((__noreturn__)) +#if defined(__GNUC__) && !defined(DEBUG) + __attribute__((noreturn)) #endif ; -- 2.16.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev