Fix build failure if build with checks but without asserts
authorChengwei Yang <chengwei.yang@intel.com>
Tue, 25 Jun 2013 03:34:11 +0000 (11:34 +0800)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 25 Jun 2013 11:26:04 +0000 (12:26 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65990
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-connection.c
dbus/dbus-message.c

index 5c732e236400414843709e0965a460ca33a475b1..efc1cfbd9e4e5604e8cff5853fa0d9234d56605f 100644 (file)
@@ -336,8 +336,8 @@ struct DBusConnection
 #ifndef DBUS_DISABLE_CHECKS
   unsigned int have_connection_lock : 1; /**< Used to check locking */
 #endif
-  
-#ifndef DBUS_DISABLE_CHECKS
+
+#if !defined(DBUS_DISABLE_CHECKS) || !defined(DBUS_DISABLE_ASSERT)
   int generation; /**< _dbus_current_generation that should correspond to this connection */
 #endif 
 };
@@ -1354,7 +1354,7 @@ _dbus_connection_new_for_transport (DBusTransport *transport)
   connection->disconnected_message_arrived = FALSE;
   connection->disconnected_message_processed = FALSE;
   
-#ifndef DBUS_DISABLE_CHECKS
+#if !defined(DBUS_DISABLE_CHECKS) || !defined(DBUS_DISABLE_ASSERT)
   connection->generation = _dbus_current_generation;
 #endif
   
index 696991f6dc1b945ee6b4365878fc5d4f86a4845b..01dcaa8e798fc953e31791365e56219ca4b85f11 100644 (file)
@@ -777,6 +777,12 @@ _dbus_message_iter_check (DBusMessageRealIter *iter)
 
   return TRUE;
 }
+#else
+static dbus_bool_t
+_dbus_message_iter_check (DBusMessageRealIter *iter)
+{
+  return TRUE;
+}
 #endif /* DBUS_DISABLE_CHECKS */
 
 /**