can-utils/include/linux
Gary Bisson f596f4ab47 can-utils: fix sign-compare warnings
Fixing following build issues seen when building with clang (AOSP14):
cansend.c:168:11: error: comparison of integers of different signs:
'int' and 'unsigned long' [-Werror,-Wsign-compare]
                if (mtu >= CANXL_MIN_MTU) {
                    ~~~ ^  ~~~~~~~~~~~~~
lib.c:525:14: error: comparison of integers of different signs: 'int'
and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
        if (maxsize > size - 1) {
            ~~~~~~~ ^ ~~~~~~~~
cangen.c:777:29: error: comparison of integers of different signs: 'int'
and 'unsigned long' [-Werror,-Wsign-compare]
                if (canxl && (ifr.ifr_mtu < CANXL_MIN_MTU)) {
                              ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
cangen.c:782:29: error: comparison of integers of different signs: 'int'
and 'unsigned long' [-Werror,-Wsign-compare]
                if (canfd && (ifr.ifr_mtu < CANFD_MTU)) {
                              ~~~~~~~~~~~ ^ ~~~~~~~~~
cangen.c:796:19: error: comparison of integers of different signs: 'int'
and 'unsigned long' [-Werror,-Wsign-compare]
                if (ifr.ifr_mtu >= CANXL_MIN_MTU) {
                    ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
cangen.c:1073:20: error: comparison of integers of different signs:
'int' and 'unsigned long' [-Werror,-Wsign-compare]
                        if (ifr.ifr_mtu >= CANXL_MIN_MTU)
                            ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
candump.c:758:15: error: comparison of integers of different signs:
'int' and 'unsigned long' [-Werror,-Wsign-compare]
                        if (nbytes < CANXL_HDR_SIZE + CANXL_MIN_DLEN) {
                            ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
2024-04-12 13:42:12 +02:00
..
can include: update includes to Linux v6.9 upstream 2024-02-14 20:18:29 +01:00
can.h can-utils: fix sign-compare warnings 2024-04-12 13:42:12 +02:00
errqueue.h include: add errqueue.h, net_tstamp.h, netlink.h 2019-05-09 14:36:53 +02:00
kernel.h mcp251xfd-dump: add tool to decode chip and driver state of mcp251xfd 2021-02-13 23:36:43 +01:00
net_tstamp.h include: add errqueue.h, net_tstamp.h, netlink.h 2019-05-09 14:36:53 +02:00
netlink.h Fix comparison type mismatch warnings 2020-05-28 20:54:37 +02:00