aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/os
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2014-04-16 17:36:51 +0100
committerJosé Fonseca <[email protected]>2014-04-17 09:56:48 +0100
commita2b89c4ae1c94005b3762e7ff06d73096fa97644 (patch)
treea38cf65d7a745b81ff645cc79e9a60ae2c81785a /src/gallium/auxiliary/os
parent97fa9cd220092a70ac0e5204fb644dff9fed470e (diff)
auxiliary/os,auxiliary/util: Fix the `‘noreturn’ function does return` warning.
Now that _debug_assert_fail() has the noreturn attribute, it is better that execution truly never returns. Not just for sake of silencing the warning, but because the code at the return IP address may be invalid or lead to inconsistent results. This removes support for the GALLIUM_ABORT_ON_ASSERT debugging environment variable, but between the usefulness of GALLIUM_ABORT_ON_ASSERT and better static code analysis I think better static code analysis wins. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/os')
-rw-r--r--src/gallium/auxiliary/os/os_misc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/os/os_misc.h b/src/gallium/auxiliary/os/os_misc.h
index 5029ab96aac..582931fe96a 100644
--- a/src/gallium/auxiliary/os/os_misc.h
+++ b/src/gallium/auxiliary/os/os_misc.h
@@ -67,7 +67,7 @@ extern "C" {
* Abort the program.
*/
#if defined(DEBUG)
-# define os_abort() os_break()
+# define os_abort() do { os_break(); abort(); } while(0)
#else
# define os_abort() abort()
#endif