[glib] Fix C++ warnings in g_error() code
- From: Jani Monoses <janimo src gnome org>
- To: svn-commits-list gnome org
- Subject: [glib] Fix C++ warnings in g_error() code
- Date: Sat, 27 Jun 2009 08:18:20 +0000 (UTC)
commit 09c3f6dd4b456adbbda6818e5bb1227af045e8d8
Author: Jani Monoses <jani ubuntu com>
Date: Sat Jun 27 11:03:47 2009 +0300
Fix C++ warnings in g_error() code
Put space before ending semicolon in for(;;) ; to avoid C++ build warnings.
Closes bug 586928.
glib/gmessages.h | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/glib/gmessages.h b/glib/gmessages.h
index af5a826..9acaec6 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -134,12 +134,14 @@ void g_assert_warning (const char *log_domain,
#define G_LOG_DOMAIN ((gchar*) 0)
#endif /* G_LOG_DOMAIN */
#ifdef G_HAVE_ISO_VARARGS
-/* for(;;); so that GCC knows that control doesn't go past g_error() */
+/* for(;;) ; so that GCC knows that control doesn't go past g_error().
+ * Put space before ending semicolon to avoid C++ build warnings.
+ */
#define g_error(...) G_STMT_START { \
g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
__VA_ARGS__); \
- for (;;); \
+ for (;;) ; \
} G_STMT_END
#define g_message(...) g_log (G_LOG_DOMAIN, \
@@ -159,7 +161,7 @@ void g_assert_warning (const char *log_domain,
g_log (G_LOG_DOMAIN, \
G_LOG_LEVEL_ERROR, \
format); \
- for (;;); \
+ for (;;) ; \
} G_STMT_END
#define g_message(format...) g_log (G_LOG_DOMAIN, \
@@ -184,7 +186,7 @@ g_error (const gchar *format,
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
va_end (args);
- for(;;);
+ for(;;) ;
}
static void
g_message (const gchar *format,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]