chiark / gitweb /
[PATCH] fix -Wsign-compare warnings
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Sat, 5 Feb 2005 01:38:56 +0000 (02:38 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:24:19 +0000 (23:24 -0700)
extras/scsi_id/scsi_serial.c
namedev_parse.c
udev_db.c
udev_sysfs.c

index 0db756404c721c25499495297190570ed563009e..8b9fbe06814c0f8cc531b9720018322336aee38c 100644 (file)
@@ -553,7 +553,7 @@ static int do_scsi_page83_inquiry(struct sysfs_device *scsi_dev, int fd,
                                  char *serial, int len)
 {
        int retval;
                                  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);
        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.
                 */
                 * 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);
                        retval = check_fill_0x83_id(scsi_dev, &page_83[j],
                                                    &id_search_list[id_ind],
                                                    serial, len);
index 3b14a6a50051a10e774b47f0dbbb5c0d8c311022..5bd59d83f230ea2113bacb48ccf25efbe86c2c06 100644 (file)
@@ -126,7 +126,7 @@ static int namedev_parse(const char *filename, void *data)
        cur = 0;
        lineno = 0;
        while (cur < bufsize) {
        cur = 0;
        lineno = 0;
        while (cur < bufsize) {
-               int i, j;
+               unsigned int i, j;
 
                count = buf_get_line(buf, bufsize, cur);
                bufline = &buf[cur];
 
                count = buf_get_line(buf, bufsize, cur);
                bufline = &buf[cur];
index 36da2647165dc0b925c09993aa3ebc1a7916a860..df7cfbb259955a021c5f289668d3e7b67a827667 100644 (file)
--- 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;
                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;
 
                        if (strncmp(name, db_udev.name, NAME_SIZE) == 0) {
                                goto found;
index 1b3603df6d0d018b815bf4488e58f3a2e3890811..fd7330a161760b00443d811762a05bc784de369f 100644 (file)
@@ -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;
                { 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)
 
        /* the kernel may tell us what to wait for */
        if (kernel_release_satisfactory(2,6,10) > 0)