diff --git a/lib/scsi-lowlevel.c b/lib/scsi-lowlevel.c index eb45d88..33541ab 100644 --- a/lib/scsi-lowlevel.c +++ b/lib/scsi-lowlevel.c @@ -1131,7 +1131,7 @@ scsi_task_get_data_in_buffer(struct scsi_task *task, uint32_t pos, ssize_t *coun } } - if (count && *count > sdb->len - pos) { + if (count && *count > (ssize_t)(sdb->len - pos)) { *count = sdb->len - pos; }