| Summary: | Fix cast-align warning in NetworkStateNotifierEfl.cpp | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||||
| Component: | New Bugs | Assignee: | Csaba Osztrogonác <ossy> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | commit-queue, ossy | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 145121 | ||||||||
| Attachments: |
|
||||||||
Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp:138
--------------------------------------------------------------------
nlh = NLMSG_NEXT(nlh, length);
---
NLMSG_NEXT is defined in /usr/include/linux/netlink.h system header,
which guarantees proper alignment, so we should simply suppress it here.
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
(struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
Created attachment 256477 [details]
Patch
Created attachment 257186 [details]
Patch
Comment on attachment 257186 [details] Patch Clearing flags on attachment: 257186 Committed r187160: <http://trac.webkit.org/changeset/187160> All reviewed patches have been landed. Closing bug. |
../../Source/WebCore/platform/network/efl/NetworkStateNotifierEfl.cpp:138:75: warning: cast from 'char *' to 'struct nlmsghdr *' increases required alignment from 1 to 4 [-Wcast-align] nlh = ((length) -= ( (((nlh)->nlmsg_len)+4U -1) & ~(4U -1) ), (struct nlmsghdr*)(((char*)(nlh)) + ( (((nlh)->nlmsg_len)+4U -1) & ~(4U -1) ))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated.