[PATCH:xdm 2/2] Mark LogPanic as noreturn per gcc's suggestion

Alan Coopersmith alan.coopersmith at oracle.com
Fri Mar 6 17:01:56 PST 2015


error.c: In function ‘LogPanic’:
error.c:93:1: warning: function might be candidate for attribute ‘noreturn’
 [-Wsuggest-attribute=noreturn]
 LogPanic (const char * fmt, ...)
 ^

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac       |    2 +-
 include/dm_error.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 12ef51c..2cd2817 100644
--- a/configure.ac
+++ b/configure.ac
@@ -328,7 +328,7 @@ AC_SUBST(SHELL_CMD)
 
 # Checks for pkg-config packages
 
-PKG_CHECK_MODULES(XDM, xmu x11 xau)
+PKG_CHECK_MODULES(XDM, [xmu x11 xau xproto >= 7.0.17])
 
 PKG_CHECK_EXISTS(xinerama, [
 	AC_DEFINE([USE_XINERAMA], 1,
diff --git a/include/dm_error.h b/include/dm_error.h
index e8a92ef..09c124e 100644
--- a/include/dm_error.h
+++ b/include/dm_error.h
@@ -40,7 +40,7 @@ extern void LogAppend    (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
 extern void LogError     (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
 extern void LogInfo      (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
 extern void LogOutOfMem  (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
-extern void LogPanic     (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2);
+extern void LogPanic     (const char * fmt, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN;
 
 
 #endif /* _DM_ERROR_H_ */
-- 
1.7.9.2



More information about the xorg-devel mailing list