Commit 4b8fe66300acb2fba8b16d62606e0d30204022fc
Committed by
David S. Miller
1 parent
f4680d3db7
Exists in
master
and in
7 other branches
netlink: fix gcc -Wconversion compilation warning
$ 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@altlinux.org> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
include/linux/netlink.h
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | Check NLM_F_EXCL |
71 | 71 | */ |
72 | 72 | |
73 | -#define NLMSG_ALIGNTO 4 | |
73 | +#define NLMSG_ALIGNTO 4U | |
74 | 74 | #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) |
75 | 75 | #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr))) |
76 | 76 | #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) |