summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2005-02-05 02:38:56 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 23:24:19 -0700
commit1134a81b98e189a8ec99a1ea4aba8e52b358873b (patch)
tree9ea0bce0558d588bf0b6d0ddc3e8464f51744523
parent9172c95c77e8f1377b6c8becc84995e6e28a61eb (diff)
[PATCH] fix -Wsign-compare warnings
-rw-r--r--extras/scsi_id/scsi_serial.c5
-rw-r--r--namedev_parse.c2
-rw-r--r--udev_db.c2
-rw-r--r--udev_sysfs.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c
index 0db756404..8b9fbe068 100644
--- a/extras/scsi_id/scsi_serial.c
+++ b/extras/scsi_id/scsi_serial.c
@@ -553,7 +553,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *scsi_dev, int fd,
char *serial, int len)
{
int retval;
- int id_ind, j;
+ unsigned int id_ind, j;
unsigned char page_83[SCSI_INQ_BUFF_LEN];
memset(page_83, 0, SCSI_INQ_BUFF_LEN);
@@ -584,8 +584,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *scsi_dev, int fd,
* Examine each descriptor returned. There is normally only
* one or a small number of descriptors.
*/
- for (j = 4; j <= page_83[3] + 3;
- j += page_83[j + 3] + 4) {
+ for (j = 4; j <= (unsigned int)page_83[3] + 3; j += page_83[j + 3] + 4) {
retval = check_fill_0x83_id(scsi_dev, &page_83[j],
&id_search_list[id_ind],
serial, len);
diff --git a/namedev_parse.c b/namedev_parse.c
index 3b14a6a50..5bd59d83f 100644
--- a/namedev_parse.c
+++ b/namedev_parse.c
@@ -126,7 +126,7 @@ static int namedev_parse(const char *filename, void *data)
cur = 0;
lineno = 0;
while (cur < bufsize) {
- int i, j;
+ unsigned int i, j;
count = buf_get_line(buf, bufsize, cur);
bufline = &buf[cur];
diff --git a/udev_db.c b/udev_db.c
index 36da26471..df7cfbb25 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -195,7 +195,7 @@ int udev_db_get_device_byname(struct udevice *udev, const char *name)
memset(&db_udev, 0x00, sizeof(struct udevice));
if (parse_db_file(&db_udev, filename) == 0) {
char *pos;
- int len;
+ unsigned int len;
if (strncmp(name, db_udev.name, NAME_SIZE) == 0) {
goto found;
diff --git a/udev_sysfs.c b/udev_sysfs.c
index 1b3603df6..fd7330a16 100644
--- a/udev_sysfs.c
+++ b/udev_sysfs.c
@@ -211,7 +211,7 @@ static int class_device_expect_no_device_link(struct sysfs_class_device *class_d
{ NULL, NULL }
};
const struct class_device *classdevice;
- int len;
+ unsigned int len;
/* the kernel may tell us what to wait for */
if (kernel_release_satisfactory(2,6,10) > 0)