Re: [Spice-devel] [PATCH spice-server 05/10] syntax-check: Check ENABLE_EXTRA_CHECKS is not used incorrectly

2017-09-12 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:48:47AM -0400, Frediano Ziglio wrote: > > > > > > On Mon, Sep 11, 2017 at 11:15:42AM +0100, Frediano Ziglio wrote: > > > > Usually configuration macros are defined to 0 or undefined. > > > > For this reason these macros are sometimes checked using #if > > > > and

Re: [Spice-devel] [PATCH spice-server 05/10] syntax-check: Check ENABLE_EXTRA_CHECKS is not used incorrectly

2017-09-11 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 11:48:47AM -0400, Frediano Ziglio wrote: > > > > On Mon, Sep 11, 2017 at 11:15:42AM +0100, Frediano Ziglio wrote: > > > Usually configuration macros are defined to 0 or undefined. > > > For this reason these macros are sometimes checked using #if > > > and sometimes with

Re: [Spice-devel] [PATCH spice-server 05/10] syntax-check: Check ENABLE_EXTRA_CHECKS is not used incorrectly

2017-09-11 Thread Frediano Ziglio
> > On Mon, Sep 11, 2017 at 11:15:42AM +0100, Frediano Ziglio wrote: > > Usually configuration macros are defined to 0 or undefined. > > For this reason these macros are sometimes checked using #if > > and sometimes with #ifndef/#ifdef. > > As this macro is always defined with 0 or 1 it makes no

Re: [Spice-devel] [PATCH spice-server 05/10] syntax-check: Check ENABLE_EXTRA_CHECKS is not used incorrectly

2017-09-11 Thread Christophe Fergeau
On Mon, Sep 11, 2017 at 11:15:42AM +0100, Frediano Ziglio wrote: > Usually configuration macros are defined to 0 or undefined. > For this reason these macros are sometimes checked using #if > and sometimes with #ifndef/#ifdef. > As this macro is always defined with 0 or 1 it makes no sense > to

[Spice-devel] [PATCH spice-server 05/10] syntax-check: Check ENABLE_EXTRA_CHECKS is not used incorrectly

2017-09-11 Thread Frediano Ziglio
Usually configuration macros are defined to 0 or undefined. For this reason these macros are sometimes checked using #if and sometimes with #ifndef/#ifdef. As this macro is always defined with 0 or 1 it makes no sense to check if defined or not so check the code to avoid this mistake.