[debug] CLUTTER_{NOTE,MARK,DBG,GLERR,TIMESTAMP} should always be statements
authorDamien Lespiau <damien.lespiau@intel.com>
Mon, 3 Aug 2009 13:11:33 +0000 (14:11 +0100)
committerDamien Lespiau <damien.lespiau@intel.com>
Mon, 3 Aug 2009 13:25:09 +0000 (14:25 +0100)
In case someone tries to do:
if (foo)
CLUTTER_NOTE(DOMAIN, "%s", blah);

CLUTTER_NOTE () should always be a statement

clutter/clutter-debug.h

index 77ee967..2a32f85 100644 (file)
@@ -77,11 +77,11 @@ typedef enum {
 
 #else /* !CLUTTER_ENABLE_DEBUG */
 
-#define CLUTTER_NOTE(type,...)
-#define CLUTTER_MARK()
-#define CLUTTER_DBG(x)
-#define CLUTTER_GLERR()
-#define CLUTTER_TIMESTAMP(type,...)
+#define CLUTTER_NOTE(type,...)         G_STMT_START { } G_STMT_END
+#define CLUTTER_MARK()                 G_STMT_START { } G_STMT_END
+#define CLUTTER_DBG(x)                 G_STMT_START { } G_STMT_END
+#define CLUTTER_GLERR()                G_STMT_START { } G_STMT_END
+#define CLUTTER_TIMESTAMP(type,...)    G_STMT_START { } G_STMT_END
 
 #endif /* CLUTTER_ENABLE_DEBUG */