[Mesa-dev] [PATCH 2/3] util/u_debug: Add noreturn attribute to _debug_assert_fail().

jfonseca at vmware.com jfonseca at vmware.com
Mon Apr 14 06:32:12 PDT 2014


From: José Fonseca <jfonseca at vmware.com>

As recommended by
http://clang-analyzer.llvm.org/annotations.html#attr_noreturn
---
 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
+;
 
 
 /** 
-- 
1.8.3.2



More information about the mesa-dev mailing list