On 21 May 2011 13:27, NeilBrown <neilb@xxxxxxx> wrote: > 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) { > 2005, hah! Thanks :) /M -- 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