Re: ANNOUNCE: mdadm 3.1.3 - A tool for managing Soft RAID under Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 6 Aug 2010 09:08:03 +0200 (CEST)
Mikael Abrahamsson <swmike@xxxxxxxxx> wrote:

> On Fri, 6 Aug 2010, Neil Brown wrote:
> 
> >
> > I am pleased to announce the availability of
> >   mdadm version 3.1.3
> 
> I get the following compile error:
> 
> 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\" -DUSE_PTHREADS   -c -o 
> super-intel.o super-intel.c
> cc1: warnings being treated as errors
> super-intel.c: In function ‘imsm_process_update’:
> super-intel.c:5393: error: format not a string literal and no format arguments
> super-intel.c:5393: error: format not a string literal and no format arguments
> make: *** [super-intel.o] Error 1
> 
> This is on a ubuntu 10.04 system with their 2.6.32 kernel.
> 
> mdadm-3.1.2 compiles fine on the same system.
> 

Thanks for the report - I guess you have a newer compiler than me.

Below patch should fix it, or just
    make CWFLAGS=
as the code will still do the right thing.

NeilBrown

diff --git a/super-intel.c b/super-intel.c
index 4cebc8d..b880a74 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5390,7 +5390,7 @@ static void imsm_process_update(struct supertype *st,
 			break;
 		}
 
-		snprintf((char *) dev->volume, MAX_RAID_SERIAL_LEN, name);
+		snprintf((char *) dev->volume, MAX_RAID_SERIAL_LEN, "%s", name);
 		super->updates_pending++;
 		break;
 	}
--
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


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux