[PATCH 18/37] pseudoramiX: Clean up warnings. Only compile on XQUARTZ.
Keith Packard
keithp at keithp.com
Sun Nov 17 00:01:43 PST 2013
Add gnu_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 | 6 ++++++
3 files changed, 13 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 1e6f813..5b7823e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2113,6 +2113,8 @@ if test "x$XQUARTZ" = xyes; then
fi
fi
+AM_CONDITIONAL(PSEUDORAMIX, [test "x$XQUARTZ" = 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..90ae67e 100644
--- a/pseudoramiX/pseudoramiX.c
+++ b/pseudoramiX/pseudoramiX.c
@@ -98,6 +98,9 @@ static int pseudoramiXScreensAllocated = 0;
static int pseudoramiXNumScreens = 0;
static unsigned long pseudoramiXGeneration = 0;
+#if defined(__GNUC__) && (__GNUC__ > 3)
+__attribute__((format(gnu_printf, 1, 2)))
+#endif
static void
PseudoramiXTrace(const char *format, ...)
{
@@ -108,6 +111,9 @@ PseudoramiXTrace(const char *format, ...)
va_end(ap);
}
+#if defined(__GNUC__) && (__GNUC__ > 3)
+__attribute__((format(gnu_printf, 1, 2)))
+#endif
static void
PseudoramiXDebug(const char *format, ...)
{
--
1.8.4.2
More information about the xorg-devel
mailing list