Silence sign-compare warnings in dfu.c

This commit is contained in:
Stefan Rueger 2023-01-11 23:50:26 +00:00
parent b75e26bf6d
commit 7ad5289d66
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 2 additions and 2 deletions

View File

@ -275,12 +275,12 @@ int dfu_getstatus(struct dfu_dev *dfu, struct dfu_status *status)
return -1; return -1;
} }
if (result < sizeof(struct dfu_status)) { if (result < (int) sizeof(struct dfu_status)) {
pmsg_error("unable to get DFU status: %s\n", "short read"); pmsg_error("unable to get DFU status: %s\n", "short read");
return -1; return -1;
} }
if (result > sizeof(struct dfu_status)) { if (result > (int) sizeof(struct dfu_status)) {
pmsg_error("oversize read (should not happen); exiting\n"); pmsg_error("oversize read (should not happen); exiting\n");
exit(1); exit(1);
} }