From 7848ba1d292f55553058c1f17596baa1094cdae5 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 27 May 2014 20:39:48 -0700 Subject: Add printf & noreturn attributes recommended by gcc Signed-off-by: Alan Coopersmith --- configure.ac | 2 +- utils.h | 13 +++++++------ 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); /***====================================================================***/ -- cgit v1.2.3