Re: [PATCH] Fix gcc 4.6 warnings

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

 



2011/4/14 Christophe Fergeau <cfergeau@xxxxxxxxxx>:
> gcc 4.6 warns when a variable is initialized but isn't used afterwards:
>
> vmware/vmware_driver.c:449:18: warning: variable 'vmxPath' set but not used [-Wunused-but-set-variable]
>
> This patch fixes these warnings. There are still 2 offending files:
>
> - vbox_tmpl.c: the variable is used inside an #ifdef and is assigned several
> Âtimes outside of #ifdef. Fixing the warning would have required wrapping
> Âall the assignment inside #ifdef which hurts readability.
>
> vbox/vbox_tmpl.c: In function 'vboxAttachDrives':
> vbox/vbox_tmpl.c:3918:22: warning: variable 'accessMode' set but not used [-Wunused-but-set-variable]
>
> - esx_vi_types.generated.c: the name implies it's generated code and I
> Âdidn't want to dive into the code generator
>
> esx/esx_vi_types.generated.c: In function 'esxVI_FileQueryFlags_Free':
> esx/esx_vi_types.generated.c:1203:3: warning: variable 'item' set but not used [-Wunused-but-set-variable]

I can take care of that and I'll post a speculative patch for it as I
don't have a gcc 4.6 at hand right now to test it my self.

> ---
> Âsrc/nwfilter/nwfilter_ebiptables_driver.c | Â Â7 +++----
> Âsrc/util/logging.c            Â|  Â3 +--
> Âsrc/vmware/vmware_driver.c        Â|  Â2 +-
> Â3 files changed, 5 insertions(+), 7 deletions(-)
>

ACK.

Before I can apply this patch we need to solve an issue with email
address. You used a RedHat one for this patch, but you are listed with
a Gnome one in the AUTHORS. This makes the syntax-check unhappy. We
can solve this by adding your RedHat address as an alias to the Gnome
on to the .mailmap file or use your RedHat as the mail one in the
AUTHORS files and add and alias the other way around to the .mailmap
file.

What way do you prefer?

Matthias

--
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]