From: Simon McVittie Date: Tue, 16 Apr 2013 11:14:14 +0000 (+0100) Subject: Turn a runtime assertion into a compile-time assertion X-Git-Tag: dbus-1.7.4~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24a9b93021908b6f2b20eaacc1b36fa8fb24edb4;p=thirdparty%2Fdbus.git Turn a runtime assertion into a compile-time assertion Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie Reviewed-by: Alban Crequy Reviewed-by: Ralf Habacker --- diff --git a/dbus/dbus-threads.c b/dbus/dbus-threads.c index 9a505def5..249f53fec 100644 --- a/dbus/dbus-threads.c +++ b/dbus/dbus-threads.c @@ -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;