From: Dmitry V. Levin Date: Fri, 17 Dec 2010 20:03:14 +0000 (-0800) Subject: netlink: fix gcc -Wconversion compilation warning X-Git-Tag: upstream/snapshot3+hdmi~12195^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b8fe66300acb2fba8b16d62606e0d30204022fc;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git netlink: fix gcc -Wconversion compilation warning $ cat << EOF | gcc -Wconversion -xc -S -o/dev/null - unsigned f(void) {return NLMSG_HDRLEN;} EOF : In function 'f': :3:26: warning: negative integer implicitly converted to unsigned type Signed-off-by: Dmitry V. Levin Signed-off-by: Kirill A. Shutemov Signed-off-by: David S. Miller --- 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))