Mesa (master): util/u_debug: Add noreturn attribute to _debug_assert_fail( ).

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed Apr 16 10:45:56 UTC 2014


Module: Mesa
Branch: master
Commit: f81305c0cbb0e233435a26f5e2a8a38dd752c25e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f81305c0cbb0e233435a26f5e2a8a38dd752c25e

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Apr 14 12:13:32 2014 +0100

util/u_debug: Add noreturn attribute to _debug_assert_fail().

As recommended by
http://clang-analyzer.llvm.org/annotations.html#attr_noreturn

Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/gallium/auxiliary/util/u_debug.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 9e4eb41..8570597 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -154,7 +154,11 @@ debug_get_num_option(const char *name, long dfault);
 void _debug_assert_fail(const char *expr, 
                         const char *file, 
                         unsigned line, 
-                        const char *function);
+                        const char *function)
+#ifdef __GNUC__
+   __attribute__((__noreturn__))
+#endif
+;
 
 
 /** 




More information about the mesa-commit mailing list