NeilBrown: Fix warning about unused variable.
Martin F. Krafft
madduck at alioth.debian.org
Mon May 24 09:21:06 UTC 2010
Module: mdadm
Branch: upstream
Commit: 53f50353399f71aef4041b42df845803e7388d12
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=53f50353399f71aef4041b42df845803e7388d12
Author: NeilBrown <neilb at suse.de>
Date: Wed Mar 3 10:29:24 2010 +1100
Fix warning about unused variable.
Warning only appears with -O2, but is invalid.
Signed-off-by: NeilBrown <neilb at suse.de>
---
Grow.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Grow.c b/Grow.c
index 74b63b6..4dfa344 100644
--- a/Grow.c
+++ b/Grow.c
@@ -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)
More information about the pkg-mdadm-commits
mailing list