[ovs-dev] [PATCH V2 3/3] clang: Fix the alignment warning.
Alex Wang
alexw at nicira.com
Tue Jul 23 19:37:28 UTC 2013
Thanks Ben,
On Tue, Jul 23, 2013 at 12:34 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Mon, Jul 22, 2013 at 03:47:19PM -0700, Alex Wang wrote:
> > This commit fixes the warning issued by 'clang' when pointer is casted
> > to one with greater alignment.
> >
> > Signed-off-by: Alex Wang <alexw at nicira.com>
>
> Thanks, I applied this.
>
> I noticed one place with an unnecessary cast, so I folded this in:
>
> diff --git a/lib/netlink.c b/lib/netlink.c
> index 9ed925b..50444ab 100644
> --- a/lib/netlink.c
> +++ b/lib/netlink.c
> @@ -711,8 +711,7 @@ nl_policy_parse(const struct ofpbuf *msg, size_t
> nla_offset,
> return false;
> }
>
> - NL_ATTR_FOR_EACH (nla, left,
> - (struct nlattr *) ofpbuf_at(msg, nla_offset, 0),
> + NL_ATTR_FOR_EACH (nla, left, ofpbuf_at(msg, nla_offset, 0),
> msg->size - nla_offset)
> {
> uint16_t type = nl_attr_type(nla);
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130723/f4dc134f/attachment-0003.html>
More information about the dev
mailing list