From dbb051a9d4201354b134991c2f359ae688fb4a5f Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Sat, 3 Sep 2016 16:45:12 +0200 Subject: Fix warnings from compiler option '-Wundef' Signed-off-by: Thomas Zimmermann --- configure.ac | 3 +-- dbus/dbus-marshal-recursive.c | 6 ------ dbus/dbus-marshal-recursive.h | 6 ++++++ dbus/dbus-sysdeps.h | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index ebfc098..7d94d47 100644 --- a/configure.ac +++ b/configure.ac @@ -1364,8 +1364,7 @@ dnl compiler emits while building D-Bus. Fix the source dnl code and remove these flags. DISABLE_WARNINGS="$DISABLE_WARNINGS -Wno-suggest-attribute=format - -Wno-suggest-attribute=noreturn - -Wno-undef" + -Wno-suggest-attribute=noreturn" dnl We are only calling this for its side-effect of setting up dnl --enable-compile-warnings; the WARN_CFLAGS, etc. are ignored, diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index 417068c..121230c 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -44,12 +44,6 @@ static dbus_bool_t _dbus_type_writer_write_reader_partial (DBusTypeWriter int start_after_new_len, DBusList **fixups); -/** turn this on to get deluged in TypeReader verbose spam */ -#define RECURSIVE_MARSHAL_READ_TRACE 0 - -/** turn this on to get deluged in TypeWriter verbose spam */ -#define RECURSIVE_MARSHAL_WRITE_TRACE 0 - static void free_fixups (DBusList **fixups) { diff --git a/dbus/dbus-marshal-recursive.h b/dbus/dbus-marshal-recursive.h index fa1d1ef..5a11fe3 100644 --- a/dbus/dbus-marshal-recursive.h +++ b/dbus/dbus-marshal-recursive.h @@ -27,6 +27,12 @@ #include #include +/** turn this on to get deluged in TypeReader verbose spam */ +#define RECURSIVE_MARSHAL_READ_TRACE 0 + +/** turn this on to get deluged in TypeWriter verbose spam */ +#define RECURSIVE_MARSHAL_WRITE_TRACE 0 + typedef struct DBusTypeReader DBusTypeReader; typedef struct DBusTypeWriter DBusTypeWriter; typedef struct DBusTypeReaderClass DBusTypeReaderClass; diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 3603093..4eb875f 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -290,7 +290,7 @@ struct DBusAtomic * convert that to a conventional defined/undef switch. (We can't get * the conventional defined/undef because of multiarch builds only running * ./configure once, on Darwin.) */ -#if DBUS_HAVE_ATOMIC_INT_COND +#if defined(DBUS_HAVE_ATIOMIC_INT_COND) && DBUS_HAVE_ATOMIC_INT_COND # define DBUS_HAVE_ATOMIC_INT 1 #else # undef DBUS_HAVE_ATOMIC_INT -- 2.7.4