From 45223fd77c2b39d05dd7f1aaabf614abb1770bbe Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Mon, 25 Sep 2006 16:59:08 -0700 Subject: [SCSI] Signdness issue in drivers/scsi/osst.c another signdness warning from gcc 4.1 drivers/scsi/osst.c:5154: warning: comparison of unsigned expression < 0 is always false The problem is that blk is defined as unsigned, but all usages of it are normal int cases. osst_get_frame_position() and osst_get_sector() return ints and can return negative values. If blk stays an unsigned int, the error check is useless. Signed-off-by: Eric Sesterhenn Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/osst.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 4a2fed350d4..9ecb323ebae 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -4843,8 +4843,7 @@ static int os_scsi_tape_close(struct inode * inode, struct file * filp) static int osst_ioctl(struct inode * inode,struct file * file, unsigned int cmd_in, unsigned long arg) { - int i, cmd_nr, cmd_type, retval = 0; - unsigned int blk; + int i, cmd_nr, cmd_type, blk, retval = 0; struct st_modedef * STm; struct st_partstat * STps; struct osst_request * SRpnt = NULL; -- cgit v1.2.3