Re: [PATCH 01/10] python: libvirt-override: use simpler debug

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

 



On Wed, Jun 15, 2011 at 09:23:10PM -0400, Cole Robinson wrote:
> In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED
> to avoid warnings.
> 
> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  python/libvirt-override.c |  159 ++++++++++++++++-----------------------------
>  1 files changed, 55 insertions(+), 104 deletions(-)
> 
> diff --git a/python/libvirt-override.c b/python/libvirt-override.c
> index 61d5b7d..d6582e2 100644
> --- a/python/libvirt-override.c
> +++ b/python/libvirt-override.c
> @@ -28,6 +28,16 @@ extern void initlibvirtmod(void);
>  extern void initcygvirtmod(void);
>  #endif
>  
> +//#define DEBUG_ERROR 1

  /* ... */ instead or #if 0/#endif

> +#if DEBUG_ERROR
> +# define DEBUG(fmt, ...)            \
> +   printf(fmt, __VA_ARGS__)
> +#else
> +# define DEBUG(fmt, ...)            \
> +   do {} while (0)
> +#endif

  But except for that ACK, nice cleanup independant from anything else,
  please push :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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