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

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

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

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