[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1292259913-9911-1-git-send-email-kirill@shutemov.name>
Date: Mon, 13 Dec 2010 19:05:13 +0200
From: "Kirill A. Shutsemov" <kirill@...temov.name>
To: "David S. Miller" <davem@...emloft.net>
Cc: netdev@...r.kernel.org, Pablo Neira Ayuso <pablo@...filter.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
"Dmitry V. Levin" <ldv@...linux.org>, linux-kernel@...r.kernel.org,
"Kirill A. Shutemov" <kirill@...temov.name>
Subject: [PATCH] netlink: fix gcc -Wconversion compilation warning
From: Dmitry V. Levin <ldv@...linux.org>
$ cat << EOF | gcc -Wconversion -xc -S -o/dev/null -
unsigned f(void) {return NLMSG_HDRLEN;}
EOF
<stdin>: In function 'f':
<stdin>:3:26: warning: negative integer implicitly converted to unsigned type
Signed-off-by: Dmitry V. Levin <ldv@...linux.org>
Signed-off-by: Kirill A. Shutemov <kirill@...temov.name>
---
include/linux/netlink.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 1235669..e2b9e63 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -70,7 +70,7 @@ struct nlmsghdr {
Check NLM_F_EXCL
*/
-#define NLMSG_ALIGNTO 4
+#define NLMSG_ALIGNTO 4U
#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
#define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
#define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN))
--
1.7.3.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists