For code using:
#include
NLMSG_OK
-I/include
Issue:
(nlh)->nlmsg_len is of type __u32, while len is of type int,
according to (len) >= (int)sizeof(struct nlmsghdr).
Hence (nlh)->nlmsg_len <= (len) sign-compare warning when using NLMSG_OK
Fix:
Add (int) casting:
-
For code using:
#include
NLMSG_OK
-I/include
Issue:
(nlh)->nlmsg_len is of type __u32, while len is of type int,
according to (len) >= (int)sizeof(struct nlmsghdr).
Hence (nlh)->nlmsg_len <= (len) sign-compare warning when using NLMSG_OK
Fix:
Add (int) casting:
-
On 12/15/2013 03:40 PM, Doron Tsur wrote:
> For code using:
> #include
> NLMSG_OK
> -I/include
>
> Tested-by: Doron Tsur
This should go where your Signed-off-by line is.
[insert newlines here]
> Test log:
> Compilation environments:
> Ubuntu 13.10, x86_64, gcc (Ubuntu/Linaro 4.8.1-1
For code using:
#include
NLMSG_OK
-I/include
Tested-by: Doron Tsur
Test log:
Compilation environments:
Ubuntu 13.10, x86_64, gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
Ubuntu 13.04, x86_64, gcc (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
[ -ftrack-macro-expansion=2 issue submitted:
gcc.gnu
4 matches
Mail list logo