mirror of
https://github.com/linux-can/can-utils.git
synced 2026-09-22 16:09:52 +02:00
Fix comparison type mismatch warnings
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
This commit is contained in:
committed by
Oliver Hartkopp
parent
2c87dcf468
commit
46895a41c5
+3
-3
@@ -300,7 +300,7 @@ int main(int argc, char **argv)
|
||||
ptr = argv[optind+i];
|
||||
|
||||
nbytes = strlen(ptr);
|
||||
if (nbytes >= IFNAMSIZ+sizeof("@1000000")+1) {
|
||||
if (nbytes >= (int)(IFNAMSIZ+sizeof("@1000000")+1)) {
|
||||
printf("name of CAN device '%s' is too long!\n", ptr);
|
||||
return 1;
|
||||
}
|
||||
@@ -324,7 +324,7 @@ int main(int argc, char **argv)
|
||||
|
||||
nbytes = nptr - ptr; /* interface name is up the first '@' */
|
||||
|
||||
if (nbytes >= IFNAMSIZ) {
|
||||
if (nbytes >= (int)IFNAMSIZ) {
|
||||
printf("name of CAN device '%s' is too long!\n", ptr);
|
||||
return 1;
|
||||
}
|
||||
@@ -396,7 +396,7 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nbytes < sizeof(struct can_frame)) {
|
||||
if (nbytes < (int)sizeof(struct can_frame)) {
|
||||
fprintf(stderr, "read: incomplete CAN frame\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user