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

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



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 redhat com>
> ---
>  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 veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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