Summary: | clean up compiler warnings from clang | ||
---|---|---|---|
Product: | dbus | Reporter: | Simon McVittie <smcv> |
Component: | core | Assignee: | D-Bus Maintainers <dbus> |
Status: | RESOLVED MOVED | QA Contact: | D-Bus Maintainers <dbus> |
Severity: | enhancement | ||
Priority: | medium | ||
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
tests: reassure clang that oom() does in fact not return
marshalling tests: fix an incorrect use of memcmp |
Description
Simon McVittie
2015-02-20 18:10:55 UTC
Created attachment 113693 [details] [review] tests: reassure clang that oom() does in fact not return --- gcc can tell that g_error is already noreturn, but clang can't. Created attachment 113694 [details] [review] marshalling tests: fix an incorrect use of memcmp --- We intended to memcmp sizeof(literal) bytes but were actually comparing 1 byte. Oops. (The tests still pass with this fixed, though.) Comment on attachment 113694 [details] [review] marshalling tests: fix an incorrect use of memcmp looks good Comment on attachment 113693 [details] [review] tests: reassure clang that oom() does in fact not return Review of attachment 113693 [details] [review]: ----------------------------------------------------------------- looks good Patches applied, thanks. I'll leave this open, because there are still obvious clang warnings. (In reply to Simon McVittie from comment #0) > -Wno-error=cast-align That's essentially Bug #10599 so I'm treating it as somewhat out-of-scope for this bug (although it would be good to suppress the warning until then). > -Wno-error=pointer-sign This is Bug #15522; similar. > -Wno-error=unused-const-variable This is a new insight from clang; gcc doesn't notice. We probably just need more #ifndef TESTS or whatever. > -Wno-error=tautological-compare clang is making one of our enums unsigned, where gcc makes it signed. I think we might also be abusing the relevant enum to take an out-of-range value (not allowed in Standard C) which ought to be fixed one day anyway. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/dbus/dbus/issues/122. |
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.