From cfd2cbd15f03e26fdb8617a9f37a0a25425adfe2 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 6 Feb 2012 09:35:27 -0800 Subject: [PATCH] Add cast to rta_getattr_str Warning from C++ --- include/libnetlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libnetlink.h b/include/libnetlink.h index b0656ce..b85c377 100644 --- a/include/libnetlink.h +++ b/include/libnetlink.h @@ -87,7 +87,7 @@ static inline __u64 rta_getattr_u64(const struct rtattr *rta) } static inline const char *rta_getattr_str(const struct rtattr *rta) { - return RTA_DATA(rta); + return (const char *)RTA_DATA(rta); } extern int rtnl_listen(struct rtnl_handle *, rtnl_filter_t handler, -- 2.39.2