Fix comparison type mismatch warnings

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
This commit is contained in:
Gary Bisson
2020-05-28 20:54:37 +02:00
committed by Oliver Hartkopp
parent 2c87dcf468
commit 46895a41c5
11 changed files with 14 additions and 14 deletions
+3 -3
View File
@@ -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;
}