From ab76d64df02bc03f935e9cdf5a0a29c6ffeace72 Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 28 Jul 2009 00:40:29 +0100 Subject: [PATCH] [cogl-debug] avoid warnings when using COGL_NOTE with unbraced else clauses When not building a debug build the compiler was warning about empty else clauses with no braces due to code like: if (blah) do_foo(); else COGL_NOTE (DRAW, "a-wibble"); This simply ensures that even for non debug builds COGL_NOTE will expand to a single statement. --- clutter/cogl/cogl-debug.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/cogl/cogl-debug.h b/clutter/cogl/cogl-debug.h index 0c602909a..a1e5a358c 100644 --- a/clutter/cogl/cogl-debug.h +++ b/clutter/cogl/cogl-debug.h @@ -67,7 +67,7 @@ typedef enum { #else /* !COGL_ENABLE_DEBUG */ -#define COGL_NOTE(type,...) +#define COGL_NOTE(type,...) G_STMT_START {} G_STMT_END #endif /* COGL_ENABLE_DEBUG */