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>
|
||
|---|---|---|
| .. | ||
| can | ||
| can.h | ||
| errqueue.h | ||
| kernel.h | ||
| net_tstamp.h | ||
| netlink.h | ||