mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 08:06:34 +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:
@@ -755,13 +755,13 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* mark dual-use struct canfd_frame */
|
||||
if (nbytes < CANXL_HDR_SIZE + CANXL_MIN_DLEN) {
|
||||
if (nbytes < (int)CANXL_HDR_SIZE + CANXL_MIN_DLEN) {
|
||||
fprintf(stderr, "read: no CAN frame\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (cu.xl.flags & CANXL_XLF) {
|
||||
if (nbytes != CANXL_HDR_SIZE + cu.xl.len) {
|
||||
if (nbytes != (int)CANXL_HDR_SIZE + cu.xl.len) {
|
||||
printf("nbytes = %d\n", nbytes);
|
||||
fprintf(stderr, "read: no CAN XL frame\n");
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user