[PATCH 02/18] pseudoramiX: Clean up warnings. Only compile on XQUARTZ and XWIN
Keith Packard
keithp at keithp.com
Mon Jan 13 10:17:42 PST 2014
Add _X_ATTRIBUTE_PRINTF attributes to debug functions.
PseudoramiXExtensionInit() is not defined in extinit.h if it won't be
used and we get a compiler warning when compiling the pseudoramiX code.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
Makefile.am | 6 +++++-
configure.ac | 2 ++
pseudoramiX/pseudoramiX.c | 8 ++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 5bf760b..641cc00 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,10 @@ if PRESENT
PRESENT_DIR=present
endif
+if PSEUDORAMIX
+PSEUDORAMIX_DIR=pseudoramiX
+endif
+
SUBDIRS = \
doc \
man \
@@ -35,11 +39,11 @@ SUBDIRS = \
Xext \
miext \
os \
- pseudoramiX \
randr \
render \
Xi \
xkb \
+ $(PSEUDORAMIX_DIR) \
$(DBE_DIR) \
$(RECORD_DIR) \
xfixes \
diff --git a/configure.ac b/configure.ac
index 234cf21..631a13f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2176,6 +2176,8 @@ if test "x$XQUARTZ" = xyes; then
fi
fi
+AM_CONDITIONAL(PSEUDORAMIX, [test "x$XQUARTZ" = xyes -o "x$XWIN" = xyes ])
+
# Support for objc in autotools is minimal and not documented.
OBJC='$(CC)'
OBJCLD='$(CCLD)'
diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c
index 23dbc73..f47c783 100644
--- a/pseudoramiX/pseudoramiX.c
+++ b/pseudoramiX/pseudoramiX.c
@@ -100,6 +100,10 @@ static unsigned long pseudoramiXGeneration = 0;
static void
PseudoramiXTrace(const char *format, ...)
+ _X_ATTRIBUTE_PRINTF(1, 2);
+
+static void
+PseudoramiXTrace(const char *format, ...)
{
va_list ap;
@@ -110,6 +114,10 @@ PseudoramiXTrace(const char *format, ...)
static void
PseudoramiXDebug(const char *format, ...)
+ _X_ATTRIBUTE_PRINTF(1, 2);
+
+static void
+PseudoramiXDebug(const char *format, ...)
{
va_list ap;
--
1.8.5.2
More information about the xorg-devel
mailing list