Skip to contentSkip to conversation

block/vvfat: Fix compiler warning in debug code

PATCH Applied Stefan Weil 2 participants 2 messages Sep 30, 2010 – Oct 3, 2010 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block/vvfat: Fix compiler warning in debug code

Fix this compiler warning:
./block/vvfat.c:2285: error: comparison of unsigned expression >= 0 is always true

Cc Blue Swirl <[email protected]>
Cc Kevin Wolf <[email protected]>
---
 block/vvfat.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
block/vvfat.c +0 -1
index 53e57bf..26dd474 100644
@@ -2282,7 +2282,6 @@ static void check1(BDRVVVFATState* s)
 	    fprintf(stderr, "deleted\n");
 	    continue;
 	}
-	assert(mapping->dir_index >= 0);
 	assert(mapping->dir_index < s->directory.next);
 	direntry_t* direntry = array_get(&(s->directory), mapping->dir_index);
 	assert(mapping->begin == begin_of_direntry(direntry) || mapping->first_mapping_index >= 0);
Signature · 1 line
1.7.1
Applied
#1 lore raw

Thanks, applied.

Quoted 26 lines · Stefan Weil

Fix this compiler warning:
./block/vvfat.c:2285: error: comparison of unsigned expression >= 0 is always true

Cc Blue Swirl <[email protected]>
Cc Kevin Wolf <[email protected]>

---
 block/vvfat.c |    1 -

 1 files changed, 0 insertions(+), 1 deletions(-)
block/vvfat.c +0 -2
index 53e57bf..26dd474 100644
@@ -2282,7 +2282,6 @@ static void check1(BDRVVVFATState* s)
            fprintf(stderr, "deleted\n");
            continue;
        }
-       assert(mapping->dir_index >= 0);
        assert(mapping->dir_index < s->directory.next);
        direntry_t* direntry = array_get(&(s->directory), mapping->dir_index);
        assert(mapping->begin == begin_of_direntry(direntry) || mapping->first_mapping_index >= 0);
--

1.7.1