RESOLVED FIXED 145915
Fix cast-align warning in NetworkStateNotifierEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=145915
Summary Fix cast-align warning in NetworkStateNotifierEfl.cpp
Csaba Osztrogonác
Reported 2015-06-12 04:03:58 PDT
../../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.
Attachments
Patch (1.59 KB, patch)
2015-07-09 03:15 PDT, Csaba Osztrogonác
no flags
Patch (1.60 KB, patch)
2015-07-21 11:07 PDT, Csaba Osztrogonác
no flags
Csaba Osztrogonác
Comment 1 2015-07-09 03:13:01 PDT
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) )
Csaba Osztrogonác
Comment 2 2015-07-09 03:15:16 PDT
Csaba Osztrogonác
Comment 3 2015-07-21 11:07:21 PDT
WebKit Commit Bot
Comment 4 2015-07-22 09:09:23 PDT
Comment on attachment 257186 [details] Patch Clearing flags on attachment: 257186 Committed r187160: <http://trac.webkit.org/changeset/187160>
WebKit Commit Bot
Comment 5 2015-07-22 09:09:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.