* [PATCH] rtnetlink: fix gcc -Wconversion warning
@ 2015-10-09 17:35 Ronen Arad
2015-10-13 2:41 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ronen Arad @ 2015-10-09 17:35 UTC (permalink / raw)
To: netdev; +Cc: Ronen Arad
RTA_ALIGNTO is currently define as 4. It has to be 4U to prevent warning
for RTA_ALIGN and RTA_DATA expansions when -Wconversion gcc option is
enabled.
This follows NLMSG_ALIGNTO definition in <include/uapi/linux/netlink.h>.
Signed-off-by: Ronen Arad <ronen.arad@intel.com>
---
include/uapi/linux/rtnetlink.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h
index 4db0b3c..123a5af 100644
--- a/include/uapi/linux/rtnetlink.h
+++ b/include/uapi/linux/rtnetlink.h
@@ -160,7 +160,7 @@ struct rtattr {
/* Macros to handle rtattributes */
-#define RTA_ALIGNTO 4
+#define RTA_ALIGNTO 4U
#define RTA_ALIGN(len) ( ((len)+RTA_ALIGNTO-1) & ~(RTA_ALIGNTO-1) )
#define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \
(rta)->rta_len >= sizeof(struct rtattr) && \
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtnetlink: fix gcc -Wconversion warning
2015-10-09 17:35 [PATCH] rtnetlink: fix gcc -Wconversion warning Ronen Arad
@ 2015-10-13 2:41 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-10-13 2:41 UTC (permalink / raw)
To: ronen.arad; +Cc: netdev
From: Ronen Arad <ronen.arad@intel.com>
Date: Fri, 9 Oct 2015 10:35:47 -0700
> RTA_ALIGNTO is currently define as 4. It has to be 4U to prevent warning
> for RTA_ALIGN and RTA_DATA expansions when -Wconversion gcc option is
> enabled.
> This follows NLMSG_ALIGNTO definition in <include/uapi/linux/netlink.h>.
>
> Signed-off-by: Ronen Arad <ronen.arad@intel.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-13 2:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 17:35 [PATCH] rtnetlink: fix gcc -Wconversion warning Ronen Arad
2015-10-13 2:41 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.