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

Re: [libvirt] [PATCH 06/20] util: reject unknown flags

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 redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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