From: Ben Pfaff Date: Tue, 24 May 2011 17:55:26 +0000 (-0700) Subject: netlink: Avoid "cast increases required alignment of target type" on RISC. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08c4a39ef8417de8f48874296f07ad58de46eefc;p=openvswitch netlink: Avoid "cast increases required alignment of target type" on RISC. This warning doesn't indicate a genuine problem, since 'nla' must be aligned properly and NLA_ALIGN ensures that the offset is aligned properly too. Casting via void * suppresses the warning. --- diff --git a/lib/netlink.h b/lib/netlink.h index b1bf5858..0bd2c41e 100644 --- a/lib/netlink.h +++ b/lib/netlink.h @@ -98,7 +98,7 @@ enum nl_attr_type static inline struct nlattr * nl_attr_next(const struct nlattr *nla) { - return (struct nlattr *) ((uint8_t *) nla + NLA_ALIGN(nla->nla_len)); + return (void *) ((uint8_t *) nla + NLA_ALIGN(nla->nla_len)); } static inline bool