Bug 118246 - Fix cast-align warning in WebCore/css/StylePropertySet.h
Summary: Fix cast-align warning in WebCore/css/StylePropertySet.h
Status: RESOLVED DUPLICATE of bug 119679
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-01 08:10 PDT by Csaba Osztrogonác
Modified: 2015-10-06 06:02 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2013-07-01 08:10:18 PDT
/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 ?
Comment 1 Csaba Osztrogonác 2013-07-02 07:57:14 PDT
any idea?
Comment 2 Csaba Osztrogonác 2013-07-03 03:22:33 PDT
ping?
Comment 3 Csaba Osztrogonác 2015-10-06 06:02:46 PDT

*** This bug has been marked as a duplicate of bug 119679 ***