From e1b2389b6b61c2078b4b46cb808976adf8378825 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 12 Mar 2016 18:20:51 +0100 Subject: [PATCH] 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. --- include/linux/if_link.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.47.2