Turn a runtime assertion into a compile-time assertion
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 16 Apr 2013 11:14:14 +0000 (12:14 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 10 May 2013 16:04:31 +0000 (17:04 +0100)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
dbus/dbus-threads.c

index 9a505de..249f53f 100644 (file)
@@ -506,8 +506,7 @@ init_locks (void)
 #undef LOCK_ADDR
   };
 
-  _dbus_assert (_DBUS_N_ELEMENTS (global_locks) ==
-                _DBUS_N_GLOBAL_LOCKS);
+  _DBUS_STATIC_ASSERT (_DBUS_N_ELEMENTS (global_locks) == _DBUS_N_GLOBAL_LOCKS);
 
   i = 0;