2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-15 14:17:18 +00:00

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.
This commit is contained in:
Ben Pfaff
2011-05-24 10:55:26 -07:00
parent 48e1b7fb9b
commit 08c4a39ef8

View File

@@ -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