Fix warning about unused variable.

Warning only appears with -O2, but is invalid.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-03-03 10:29:24 +11:00
parent bde713f015
commit 53f5035339
1 changed files with 4 additions and 1 deletions

5
Grow.c
View File

@ -1096,7 +1096,10 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
/* set them all just in case some old 'new_*' value
* persists from some earlier problem
*/
int err;
int err = err; /* only used if rv==1, and always set if
* rv==1, so initialisation not needed,
* despite gcc warning
*/
if (sysfs_set_num(sra, NULL, "chunk_size", nchunk) < 0)
rv = 1, err = errno;
if (!rv && sysfs_set_num(sra, NULL, "layout", nlayout) < 0)