Summary: | turn runtime assertions into compile-time assertions | ||
---|---|---|---|
Product: | dbus | Reporter: | Simon McVittie <smcv> |
Component: | core | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | low | CC: | alban.crequy, smcv, thiago, walters |
Version: | unspecified | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | review? | ||
i915 platform: | i915 features: | ||
Attachments: |
Add _DBUS_GNUC_UNUSED, and use it in _DBUS_STATIC_ASSERT
Replace some runtime assertions with compile-time assertions |
Description
Simon McVittie
2014-09-11 13:34:13 UTC
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.