[libvirt] [PATCH] virsh: Print error message if argument parsing fails for cmdNodesuspend

Daniel P. Berrange berrange at redhat.com
Tue Dec 13 23:08:16 UTC 2011

On Tue, Dec 13, 2011 at 03:32:12PM -0700, Eric Blake wrote:
> On 12/13/2011 03:24 PM, Peter Krempa wrote:
> >> Compilation without NLS will trigger gcc warnings that you are using a
> >> printf-style interface without any %.  Write this as vshError(ctl, "%s",
> >> _("Invalid target argument")).
> >>
> > 
> > Oh! Now I understand why there's used notation "%s", "some const string"
> > throughout virsh.
> I wish we could get gcc to warn even when compiling with NLS.  clang
> also issues the warnings about a constant format string, regardless of
> whether NLS is enabled, but we don't compile under clang as often.

Perhaps the best thing todo is to simply change autobuild.sh to run
with --disable-nls.

Autobuild already results in 2 complete builds, one direct and one
via rpmbuild, so adding --disable-nls to the first direct build
will improve our coverage here

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

More information about the libvir-list mailing list