From bcdde5853c42b24f91aa75641fe498e71afb3527 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 18 Sep 2014 14:02:58 +0200 Subject: [PATCH] Fix test failure caused by incomplete dbus_assert implementation when running tests configured with --enable-tests --enable-embedded-tests. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83968 --- dbus/dbus-internals.h | 2 +- dbus/dbus-marshal-recursive.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 4658b67..6765803 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -125,7 +125,7 @@ void _dbus_trace_ref (const char *obj_name, const char* _dbus_strerror (int error_number); #ifdef DBUS_DISABLE_ASSERT -#define _dbus_assert(condition) do { } while (0) +#define _dbus_assert(condition) do { dbus_bool_t r = (condition) != 0 ? 0 : 1; } while (0) #else void _dbus_real_assert (dbus_bool_t condition, const char *condition_text, diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index 4adfd2e..55e7a57 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -703,7 +703,6 @@ static const DBusTypeReaderClass variant_reader_class = { base_reader_next }; -#ifndef DBUS_DISABLE_ASSERT static const DBusTypeReaderClass * const all_reader_classes[] = { &body_reader_class, @@ -716,7 +715,6 @@ all_reader_classes[] = { &array_types_only_reader_class, &variant_reader_class }; -#endif /** * Initializes a type reader. -- 1.8.4.5