mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
can-utils: fix sign-compare warnings (#513)
Fixing several build issues reported by Gary Bisson when he was building can-utils with clang (AOSP14). URL: https://github.com/linux-can/can-utils/pull/512 Reported-by: Gary Bisson (https://github.com/gibsson) Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -156,7 +156,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
mtu = ifr.ifr_mtu;
|
||||
|
||||
if (mtu == CANFD_MTU) {
|
||||
if (mtu == (int)CANFD_MTU) {
|
||||
/* interface is ok - try to switch the socket into CAN FD mode */
|
||||
if (setsockopt(s, SOL_CAN_RAW, CAN_RAW_FD_FRAMES,
|
||||
&enable_canfx, sizeof(enable_canfx))){
|
||||
@@ -165,7 +165,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (mtu >= CANXL_MIN_MTU) {
|
||||
if (mtu >= (int)CANXL_MIN_MTU) {
|
||||
/* interface is ok - try to switch the socket into CAN XL mode */
|
||||
if (setsockopt(s, SOL_CAN_RAW, CAN_RAW_XL_FRAMES,
|
||||
&enable_canfx, sizeof(enable_canfx))){
|
||||
|
||||
Reference in New Issue
Block a user