On Sat, 21 May 2011 11:20:01 +0100 Mathias BurÃn <mathias.buren@xxxxxxxxx> wrote: > The git as of today "fails" to compile on my Archlinux system: > > ==> Starting build()... > ==> Fetching sources... > Cloning into ./mdadm... > remote: Counting objects: 9107, done. > remote: Compressing objects: 100% (6096/6096), done. > remote: Total 9107 (delta 6874), reused 3903 (delta 3004) > Receiving objects: 100% (9107/9107), 2.46 MiB | 12 KiB/s, done. > Resolving deltas: 100% (6874/6874), done. > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > mdadm.o mdadm.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > config.o config.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > policy.o policy.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > mdstat.o mdstat.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > ReadMe.o ReadMe.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > util.o util.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > maps.o maps.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > lib.o lib.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Manage.o Manage.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Assemble.o Assemble.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Build.o Build.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Create.o Create.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Detail.o Detail.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Examine.o Examine.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Grow.o Grow.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Monitor.o Monitor.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > dlink.o dlink.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Kill.o Kill.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Query.o Query.c > gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter > -ggdb -DSendmail=\""/usr/sbin/sendmail -t"\" > -DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\" > -DMAP_DIR=\"/dev/.mdadm\" -DMAP_FILE=\"map\" > -DMDMON_DIR=\"/dev/.mdadm\" > -DFAILED_SLOTS_DIR=\"/dev/.mdadm/failed-slots\" -DUSE_PTHREADS -c -o > Incremental.o Incremental.c > Query.c: In function âQueryâ: > Query.c:38:16: error: variable âsuperrnoâ set but not used > [-Werror=unused-but-set-variable] > cc1: all warnings being treated as errors > > make: *** [Query.o] Error 1 > make: *** Waiting for unfinished jobs.... > ==> ERROR: A failure occurred in build(). > Aborting... > > This with gcc 4.6.0. > > Regards, > /M Thanks for the report. This patch will go in in the near future. (The variable has been unused since 2005 !!!) Thanks, NeilBrown diff --git a/Query.c b/Query.c index f9857d6..0b15e28 100644 --- a/Query.c +++ b/Query.c @@ -35,7 +35,7 @@ int Query(char *dev) int fd = open(dev, O_RDONLY); int vers; int ioctlerr; - int superror, superrno; + int superror; struct mdinfo info; mdu_array_info_t array; struct supertype *st = NULL; @@ -82,10 +82,9 @@ int Query(char *dev) array.spare_disks, array.spare_disks==1?"":"s"); } st = guess_super(fd); - if (st) { + if (st) superror = st->ss->load_super(st, fd, dev); - superrno = errno; - } else + else superror = -1; close(fd); if (superror == 0) { -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html