Bug 118246
| Summary: | Fix cast-align warning in WebCore/css/StylePropertySet.h | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | kling, koivisto, ossy |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Csaba Osztrogonác
/home/oszi/WebKit/Source/WebCore/css/StylePropertySet.h:181:189: warning: cast from 'const char*' to 'const WebCore::StylePropertyMetadata*' increases required alignment of target type [-Wcast-align]
This line introduced in https://trac.webkit.org/changeset/133138
179: inline const StylePropertyMetadata* ImmutableStylePropertySet::metadataArray() const
180: {
181: return reinterpret_cast<const StylePropertyMetadata*>(&reinterpret_cast<const char*>((&static_cast<const ImmutableStylePropertySet*>(this)->m_storage))[m_arraySize * sizeof(CSSValue*)]);
182: }
This long line is so obfuscated for me. :) Could you check it this warning is valid
or can be supressable by using reinterpret_cast_ptr instead of reinterpret_cast ?
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Csaba Osztrogonác
any idea?
Csaba Osztrogonác
ping?
Csaba Osztrogonác
*** This bug has been marked as a duplicate of bug 119679 ***