On 04/04/2011 10:20 AM, Daniel P. Berrange wrote: > * m4/virt-compile-warnings.m4: Enable -Wunused-macros > * daemon/libvirtd.c: Remove MAX_LISTEN > * daemon/remote.c: Remote VIR_FROM_THIS s/Remote/Remove/ > 33 files changed, 38 insertions(+), 108 deletions(-) Nice ratio! > +++ b/src/esx/esx_vi_methods.c > @@ -1,4 +1,3 @@ > - > /* > * esx_vi_methods.c: client for the VMware VI API 2.5 to manage ESX hosts > * > @@ -52,8 +51,10 @@ > > > > +#if 0 > #define ESX_VI__METHOD__CHECK_OUTPUT__RequiredList \ Won't this cause 'make syntax-check' grief during cppi checks? (Multiple instances) > +++ b/tools/virsh.c > @@ -409,15 +409,6 @@ _vshStrdup(vshControl *ctl, const char *s, const char *filename, int line) > exit(EXIT_FAILURE); > } > > -/* Poison the raw allocating identifiers in favor of our vsh variants. */ > -#undef malloc > -#undef calloc > -#undef realloc > -#undef strdup > -#define malloc use_vshMalloc_instead_of_malloc > -#define calloc use_vshCalloc_instead_of_calloc > -#define realloc use_vshRealloc_instead_of_realloc > -#define strdup use_vshStrdup_instead_of_strdup Hmm, I don't want to completely lose this. Can we instead include "warn-on-use.h" (already provided by gnulib) and do: _GL_WARN_ON_USE(malloc, "use vshMalloc instead of malloc"); to get the same poisoning effects but via magic attributes rather than unused macros? -- 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