Re: [libvirt] [PATCH] virsh: silence compiler warning

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

 



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.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]