[libvirt] 141 format string warnings

Daniel Veillard veillard at redhat.com
Wed Oct 8 12:24:04 UTC 2008


On Wed, Oct 08, 2008 at 12:07:17PM +0200, Jim Meyering wrote:
> "Daniel P. Berrange" <berrange at redhat.com> wrote:
> 
> > On Wed, Oct 08, 2008 at 11:47:33AM +0200, Jim Meyering wrote:
> >> Hello,
> >>
> >> I count 141 warnings like this:
> >>
> >>   util.c:177: warning: format not a string literal and no format arguments
> >>
> >> If anyone is in the process of fixing those, please let me know soon.
> >
> > What compile options are you using ? I run with --enable-compile-warnings=error
> > and it all passes
> 
> I did something like this:
> 
> test -f makerr && backup makerr; (date; ./configure \
> --disable-nls --disable-shared --enable-test-coverage \
> CFLAGS='-O2 -g -Wformat -Wformat-security -Winit-self -Wall -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -Dlint' && make && make check && make distcheck; date ) >& makerr & tail -F makerr
> 
> Disabling nls makes it so _() is a no-op, and that exposes
> the otherwise-hidden-from-gcc's-perspective literal format
> strings for analysis.

  Ahhh, okay ! Well feel free to push fixes, I don't think anybody else
  saw those before...

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list