[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 11 of 18] tools/libxl: fix build errors caused by Werror in disk_eject_xswatch_callback
On Mon, 2012-04-02 at 20:58 +0100, Olaf Hering wrote: > On Mon, Apr 02, Ian Jackson wrote: > > > Olaf Hering writes ("[Xen-devel] [PATCH 11 of 18] tools/libxl: fix build > > errors caused by Werror in disk_eject_xswatch_callback"): > > > tools/libxl: fix build errors caused by Werror in > > > disk_eject_xswatch_callback > > > > > > -O2 -Wall -Werror triggers these warnings: > > > > > > libxl.c: In function 'disk_eject_xswatch_callback': > > > libxl.c:928: warning: zero-length printf format string > > > > There is nothing wrong with zero-length format strings. This warning > > should be disabled. Please do send a patch to do so. > > -Wno-format-zero-length -Wall has no effect, and -Wall comes from > RPM_OPT_FLAGS which will come last with my current EXTRA_CFLAGS patch. IMHO it's a little bit unreasonable for RPM to think it knows better than upstream what warning flags are appropriate. Especially given not all the warnings are useful and/or make sense (which is certainly the case for Wformat-zero-length[0]). I'd suggest that RPM_OPT_FLAGS either ought to omit Wno-format-zero-length or, if it is a member of some umbrella -W option, grow a -Wno-format-zero-length. Or if you cannot control RPM_OPT_FLAGS in that way you should pass it alongside RPM_OPT_FLAGS in via EXTRA_CFLAGS. [0] Even gcc(1) says: -Wno-format-zero-length (C and Objective-C only) If -Wformat is specified, do not warn about zero-length formats. The C standard specifies that zero-length formats are allowed. So quite why it appears that Wall is enabling Wformat-zero-length I have no idea, this is a clear gcc bug in my opinion. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |