Static assertions are good: they prevent dbus from even compiling on platforms where certain assumptions don't hold.
Created attachment 106131 [details] [review] Add _DBUS_GNUC_UNUSED, and use it in _DBUS_STATIC_ASSERT This means we can use _DBUS_STATIC_ASSERT at non-global scope without tripping -Wunused-local-typedefs. Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> --- My colleague Alban already reviewed this internally.
Created attachment 106132 [details] [review] Replace some runtime assertions with compile-time assertions This requires a little bit of code re-ordering, because _DBUS_STATIC_ASSERT can appear anywhere that a variable declaration would be valid, i.e. not after executable code.
Comment on attachment 106132 [details] [review] Replace some runtime assertions with compile-time assertions Review of attachment 106132 [details] [review]: ----------------------------------------------------------------- It looks good to me.
Fixed in git for 1.9.0
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.