examples/netmap_compat: fix overflow in ioctl operation
authorOlivier Matz <olivier.matz@6wind.com>
Wed, 17 Dec 2014 12:55:23 +0000 (13:55 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 17 Dec 2014 23:26:08 +0000 (00:26 +0100)
commitd50f463fbe0626108ab1f1254cce4c17f39c4f30
tree93640355f86fc098da3855d8a6cee347da2cea84
parent74cc29448591d5005daf66cff84bd18aa4c606f3
examples/netmap_compat: fix overflow in ioctl operation

Compiling the netmap example with clang-3.5 triggered the following
warning:

  compat_netmap.c:783:11: error: overflow converting case value to
    switch condition type (3225184658 to 18446744072639768978)
    [-Werror,-Wswitch]
              case NIOCREGIF:
                 ^
Indeed, an ioctl value should be an unsigned 32 bits, not an int.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
examples/netmap_compat/lib/compat_netmap.c
examples/netmap_compat/lib/compat_netmap.h