Re: [Spice-devel] [PATHCH win-qxl 4/8] display/qxldd.h: add DEBUG_PRINT_ONCE

2011-04-08 Thread Hans de Goede
Hi, nit pick, the usual way to do preprocessor macros with { } is: #define foo(x) \ do { \ bar \ } while (0) This way you don't end up with a stray ; after the } which sometimes can lead to issues / warnings. IE: if (x) foo(x); else ... Would not work with your way

Re: [Spice-devel] [PATHCH win-qxl 4/8] display/qxldd.h: add DEBUG_PRINT_ONCE

2011-04-08 Thread Christophe Fergeau
Hi, On Fri, Apr 08, 2011 at 11:48:12AM +0200, Hans de Goede wrote: nit pick, the usual way to do preprocessor macros with { } is: I was about to nit pick about the same thing ;) On a side note, I'm curious about the #define DEBUG_PRINT(arg) DebugPrint arg which require using double (( as in

Re: [Spice-devel] [PATHCH win-qxl 4/8] display/qxldd.h: add DEBUG_PRINT_ONCE

2011-04-08 Thread Alon Levy
On Fri, Apr 08, 2011 at 11:48:12AM +0200, Hans de Goede wrote: Hi, nit pick, the usual way to do preprocessor macros with { } is: I'll fix. #define foo(x) \ do { \ bar \ } while (0) This way you don't end up with a stray ; after the } which sometimes can lead to issues