From: Vincent Bernat Date: Sat, 12 Mar 2016 17:20:51 +0000 (+0100) Subject: include: fix definition of IFLA_RTA to please clang X-Git-Tag: 0.9.2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e1b2389b6b61c2078b4b46cb808976adf8378825;p=thirdparty%2Flldpd.git include: fix definition of IFLA_RTA to please clang In `linux/if_link.h`, clang assume we have an alignment problem while we know this is not the case. Add a cast to void* to avoid this warning. --- diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 5d206c71..06e25275 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h @@ -156,7 +156,7 @@ enum { #define IFLA_MAX (__IFLA_MAX - 1) /* backwards compatibility for userspace */ -#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) +#define IFLA_RTA(r) ((struct rtattr*)(void*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) enum {