summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-27 20:39:48 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-27 20:39:48 -0700
commit7848ba1d292f55553058c1f17596baa1094cdae5 (patch)
tree53169fdb29d9e785384157ce4e4482c62befc723
parent8a7b707f6f841655498c753701ee38f12ba630cf (diff)
Add printf & noreturn attributes recommended by gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac2
-rw-r--r--utils.h13
2 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 4723982..66db16a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,7 +39,7 @@ XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XKBPRINT, xkbfile x11)
+PKG_CHECK_MODULES(XKBPRINT, [xkbfile x11 xproto >= 7.0.17])
AC_CONFIG_FILES([
Makefile
diff --git a/utils.h b/utils.h
index a30f782..f37c8df 100644
--- a/utils.h
+++ b/utils.h
@@ -77,12 +77,13 @@ typedef int Comparison;
/***====================================================================***/
extern Boolean uSetErrorFile(const char *name);
-extern void uInformation(const char *s, ...);
-extern void uAction(const char *s, ...);
-extern void uWarning(const char *s, ...);
-extern void uError(const char *s, ...);
-extern void uFatalError(const char *s, ...);
-extern void uInternalError(const char *s, ...);
+extern void uInformation(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void uAction(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void uWarning(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void uError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void uFatalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2)
+ _X_NORETURN;
+extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1, 2);
/***====================================================================***/