]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
GCC4.6: Squash warning in cmd_ubi.c:
authorMarek Vasut <marek.vasut@gmail.com>
Fri, 30 Sep 2011 10:13:25 +0000 (12:13 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 1 Oct 2011 21:34:21 +0000 (23:34 +0200)
cmd_ubi.c: In function ‘ubi_volume_read’:
cmd_ubi.c:319:9: warning: variable ‘count_save’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
common/cmd_ubi.c

index 629758fdf5e7aa7ae98ea70cdb8a6ccde0c4b818..8c1bc23a5a98d5ad04ee2a3775318c12824b28e2 100644 (file)
@@ -316,7 +316,6 @@ static int ubi_volume_write(char *volume, void *buf, size_t size)
 static int ubi_volume_read(char *volume, char *buf, size_t size)
 {
        int err, lnum, off, len, tbuf_size;
-       size_t count_save = size;
        void *tbuf;
        unsigned long long tmp;
        struct ubi_volume *vol;
@@ -347,7 +346,7 @@ static int ubi_volume_read(char *volume, char *buf, size_t size)
        if (vol->corrupted)
                printf("read from corrupted volume %d", vol->vol_id);
        if (offp + size > vol->used_bytes)
-               count_save = size = vol->used_bytes - offp;
+               size = vol->used_bytes - offp;
 
        tbuf_size = vol->usable_leb_size;
        if (size < tbuf_size)