[libvirt] [PATCH 06/20] util: reject unknown flags
Eric Blake
eblake at redhat.com
Fri Jul 8 21:29:13 UTC 2011
On 07/06/2011 09:15 PM, Daniel Veillard wrote:
>> int nodeGetMemoryStats(virConnectPtr conn ATTRIBUTE_UNUSED,
>> int cellNum,
>> virNodeMemoryStatsPtr params,
>> int *nparams,
>> - unsigned int flags ATTRIBUTE_UNUSED);
>> + unsigned int flags);
>> int nodeGetCellsFreeMemory(virConnectPtr conn,
>> unsigned long long *freeMems,
>> int startCell,
>
> Hummm, shouldn't we forbid ATTRIBUTE_UNUSED from .h forward
> declarations and keep them only in the actual implementation block.
> I don't think it's a good idea to expos this to the compiler who might
> make an optimization there seeing it in the .h while the equivalent
> implementation may have removed it.
Good point. I probably ought to do a followup patch (but did not do so
in my 27-patch v2); here's the remaining culprits:
src/nodeinfo.h - two instances of virConnectPtr conn ATTRIBUTE_UNUSED
src/qemu/qemu_domain.h: qemuDomainEventFlush()
src/util/virterror_internal.h - virReportErrorHelper()
src/xenxs/xen_sxpr.h - xenFormatSxprDisk()
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110708/99803075/attachment-0001.sig>
More information about the libvir-list
mailing list