summaryrefslogtreecommitdiffstats
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-08-05 05:13:02 +0200
committerNeilBrown <neilb@suse.de>2010-08-05 05:13:02 +0200
commitf21e18ca8969f21549c646096f354eac57cd53a8 (patch)
tree5e0b0474075ba8f629860964914fe18a6892ccd4 /sysfs.c
parentDetail: clean up handing of the 'info' we load from superblock. (diff)
downloadmdadm-f21e18ca8969f21549c646096f354eac57cd53a8.tar.xz
mdadm-f21e18ca8969f21549c646096f354eac57cd53a8.zip
Compile with -Wextra by default
This produced lots of warning, some of which pointed to actual bugs. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysfs.c b/sysfs.c
index 725c90c5..6e1d77b3 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -195,7 +195,7 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options)
if (options & GET_SAFEMODE) {
int scale = 1;
int dot = 0;
- int i;
+ unsigned i;
unsigned long msec;
size_t len;
@@ -372,7 +372,7 @@ unsigned long long get_component_size(int fd)
char fname[50];
int n;
if (fstat(fd, &stb)) return 0;
- if (major(stb.st_rdev) != get_mdp_major())
+ if (major(stb.st_rdev) != (unsigned)get_mdp_major())
sprintf(fname, "/sys/block/md%d/md/component_size",
(int)minor(stb.st_rdev));
else
@@ -393,7 +393,7 @@ int sysfs_set_str(struct mdinfo *sra, struct mdinfo *dev,
char *name, char *val)
{
char fname[50];
- int n;
+ unsigned int n;
int fd;
sprintf(fname, "/sys/block/%s/md/%s/%s",