]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
include: fix definition of IFLA_RTA to please clang
authorVincent Bernat <vincent@bernat.im>
Sat, 12 Mar 2016 17:20:51 +0000 (18:20 +0100)
committerVincent Bernat <vincent@bernat.im>
Sat, 12 Mar 2016 17:20:51 +0000 (18:20 +0100)
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.

include/linux/if_link.h

index 5d206c712b7647d0db19e57b88ca146582d4cfcd..06e25275ee6b760947cd1e61474f452b264a9a9c 100644 (file)
@@ -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 {