[libvirt] [PATCH] util: warn when passing a non-pointer to VIR_FREE

Christophe Fergeau cfergeau at redhat.com
Fri Apr 22 18:25:28 UTC 2011


On Fri, Apr 22, 2011 at 08:21:24PM +0200, Christophe Fergeau wrote:
> There were recently some bugs where VIR_FREE was called with an
> int parameter. Try to affect the value passed to VIR_FREE to
> a const void* so that the compiler gets a chance to emit a warning
> if we didn't pass a pointer to VIR_FREE.

With this patch, I don't get any warnings except for the

remote.c: In function ‘remoteDispatchListNetworks’:
remote.c:3517:67: attention : initialization makes pointer from integer
without a cast [enabled by default]

which were just fixed.

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/20110422/181d5e9a/attachment-0001.sig>


More information about the libvir-list mailing list