[libvirt] [PATCH] virsh: silence compiler warning
Jim Meyering
jim at meyering.net
Wed Mar 3 09:03:32 UTC 2010
Eric Blake wrote:
> gcc warns:
> virsh.c:1879: warning: '0' flag ignored with '-' flag in gnu_printf format
Odd... I don't get that warning on F12 or rawhide.
Which version of gcc are you using?
Any added options, beyond those provided by this:
./autogen.sh --enable-compile-warnings=maximum
> * tools/virsh.c (cmdDomjobinfo): Delete useless flag.
> ---
> tools/virsh.c | 18 +++++++++---------
> 1 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index a6a637d..65487ed 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -1876,27 +1876,27 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
> vshPrint(ctl, "%-17s %-12llu ms\n", _("Time remaining:"), info.timeRemaining);
> if (info.dataTotal || info.dataRemaining || info.dataProcessed) {
> val = prettyCapacity(info.dataProcessed, &unit);
> - vshPrint(ctl, "%-17s %-0.3lf %s\n", _("Data processed:"), val, unit);
> + vshPrint(ctl, "%-17s %-.3lf %s\n", _("Data processed:"), val, unit);
ACK. That's safe.
Confirmed: it's the change that would be produced by sed s/%-0/%-/,
and virsh.c is the only affected file.
More information about the libvir-list
mailing list