fix g_return_if_fail, g_assert and friends to have a body for
authorTim Janik <timj@gtk.org>
Sun, 12 Aug 2001 19:08:13 +0000 (19:08 +0000)
committerTim Janik <timj@src.gnome.org>
Sun, 12 Aug 2001 19:08:13 +0000 (19:08 +0000)
Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>

        * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
        have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
        fixes #58873.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmessages.h

index 8160cdf..5f4c3e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index 8160cdf..5f4c3e0 100644 (file)
@@ -1,3 +1,9 @@
+Sun Aug 12 21:05:13 2001  Tim Janik  <timj@gtk.org>
+
+       * glib/gmessages.h: fix g_return_if_fail, g_assert and friends to
+       have a body for G_DISABLE_CHECKS and G_DISABLE_ASSERT.
+       fixes #58873.
+
 2001-08-12  Ron Steinke  <rsteinke@w-link.net>
 
        * glib/giochannel.c: safer handling of errno, fixed
index b937b49..beedda5 100644 (file)
@@ -186,8 +186,8 @@ GPrintFunc   g_set_message_handler (GPrintFunc func);
 
 #ifdef G_DISABLE_ASSERT
 
-#define g_assert(expr)
-#define g_assert_not_reached()
+#define g_assert(expr)         G_STMT_START{ }G_STMT_END
+#define g_assert_not_reached() G_STMT_START{ }G_STMT_END
 
 #else /* !G_DISABLE_ASSERT */
 
@@ -236,10 +236,10 @@ GPrintFunc   g_set_message_handler (GPrintFunc func);
 
 #ifdef G_DISABLE_CHECKS
 
-#define g_return_if_fail(expr)
-#define g_return_val_if_fail(expr,val)
-#define g_return_if_reached() return
-#define g_return_val_if_reached(val) return (val)
+#define g_return_if_fail(expr)                 G_STMT_START{ }G_STMT_END
+#define g_return_val_if_fail(expr,val)         G_STMT_START{ }G_STMT_END
+#define g_return_if_reached()                  G_STMT_START{ return; }G_STMT_END
+#define g_return_val_if_reached(val)           G_STMT_START{ return (val); }G_STMT_END
 
 #else /* !G_DISABLE_CHECKS */