[libvirt] [PATCH] esx: Fix gcc 4.6 warning about initialized but unused variables

Christophe Fergeau cfergeau at redhat.com
Fri Apr 15 09:25:53 UTC 2011


Hi Matthias,

On Thu, Apr 14, 2011 at 07:18:27PM +0200, Matthias Bolte wrote:
> This is a speculative patch as I don't have gcc 4.6 at hand to test it.

I no longer get the warning with this patch applied. At first I was worried
about the use of ATTRIBUTE_UNUSED (I assumed it meant "this var is unused,
feel free to optimize it away"), but gcc documentation indeed says:
"unused
    This attribute, attached to a variable, means that the variable is
meant to be possibly unused. GCC will not produce a warning for this
variable."

So this all looks good to me (aka ack from me)

Christophe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110415/3f9ac319/attachment-0001.sig>


More information about the libvir-list mailing list