[cairo-commit] src/cairo-xlib-surface.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Aug 10 10:01:32 PDT 2009
src/cairo-xlib-surface.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit dff0a91742908098a1ee110fadf11d4b802b1587
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Aug 10 17:57:16 2009 +0100
[xlib] Rewrite UNSUPPORTED() avoiding gcc-ism
Behdad pointed out that fprintf() returns a value so that we could simply
use the comma operator to return the correct value instead of the
expression-block gcc-ism.
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index bc7efba..150e6e0 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -60,12 +60,11 @@
#define DEBUG 0
#if DEBUG
-#define UNSUPPORTED(reason) ({ \
+#define UNSUPPORTED(reason) \
fprintf (stderr, \
"cairo-xlib: hit unsupported operation %s(), line %d: %s\n", \
- __FUNCTION__, __LINE__, reason); \
- CAIRO_INT_STATUS_UNSUPPORTED; \
-})
+ __FUNCTION__, __LINE__, reason), \
+ CAIRO_INT_STATUS_UNSUPPORTED
#else
#define UNSUPPORTED(reason) CAIRO_INT_STATUS_UNSUPPORTED
#endif
More information about the cairo-commit
mailing list