Skip to content
Snippets Groups Projects
Commit 2984fd16 authored by Marek Vasut's avatar Marek Vasut Committed by Wolfgang Denk
Browse files

GCC4.6: Squash warning in cmd_ubi.c:


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: default avatarMarek Vasut <marek.vasut@gmail.com>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
parent cac952ff
No related branches found
No related tags found
No related merge requests found
...@@ -316,7 +316,6 @@ static int ubi_volume_write(char *volume, void *buf, size_t size) ...@@ -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) static int ubi_volume_read(char *volume, char *buf, size_t size)
{ {
int err, lnum, off, len, tbuf_size; int err, lnum, off, len, tbuf_size;
size_t count_save = size;
void *tbuf; void *tbuf;
unsigned long long tmp; unsigned long long tmp;
struct ubi_volume *vol; struct ubi_volume *vol;
...@@ -347,7 +346,7 @@ static int ubi_volume_read(char *volume, char *buf, size_t size) ...@@ -347,7 +346,7 @@ static int ubi_volume_read(char *volume, char *buf, size_t size)
if (vol->corrupted) if (vol->corrupted)
printf("read from corrupted volume %d", vol->vol_id); printf("read from corrupted volume %d", vol->vol_id);
if (offp + size > vol->used_bytes) if (offp + size > vol->used_bytes)
count_save = size = vol->used_bytes - offp; size = vol->used_bytes - offp;
tbuf_size = vol->usable_leb_size; tbuf_size = vol->usable_leb_size;
if (size < tbuf_size) if (size < tbuf_size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment