Use "if (expr) else" rather than "if (!(expr))" so the parentheses don't
authorDarin Adler <darin@src.gnome.org>
Mon, 11 Feb 2002 22:15:42 +0000 (22:15 +0000)
committerDarin Adler <darin@src.gnome.org>
Mon, 11 Feb 2002 22:15:42 +0000 (22:15 +0000)
* glib/gmessages.h: Use "if (expr) else" rather than
"if (!(expr))" so the parentheses don't disable the gcc
warnings about = vs. ==.

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 4204d23..7533460 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 4204d23..7533460 100644 (file)
@@ -1,3 +1,9 @@
+2002-02-11  Darin Adler  <darin@bentspoon.com>
+
+       * glib/gmessages.h: Use "if (expr) else" rather than
+       "if (!(expr))" so the parentheses don't disable the gcc
+       warnings about = vs. ==.
+
 2002-02-11  jacob berkman  <jacob@ximian.com>
 
        * glib/gmarkup.h (g_markup_error_quark): match the signature in
index 6d39e71..f52934c 100644 (file)
@@ -193,7 +193,7 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
 #ifdef __GNUC__
 
 #define g_assert(expr)                 G_STMT_START{           \
-     if (!(expr))                                              \
+     if (expr) else                                            \
        g_log (G_LOG_DOMAIN,                                    \
              G_LOG_LEVEL_ERROR,                                \
              "file %s: line %d (%s): assertion failed: (%s)",  \
@@ -213,7 +213,7 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
 #else /* !__GNUC__ */
 
 #define g_assert(expr)                 G_STMT_START{           \
-     if (!(expr))                                              \
+     if (expr) else                                            \
        g_log (G_LOG_DOMAIN,                                    \
              G_LOG_LEVEL_ERROR,                                \
              "file %s: line %d: assertion failed: (%s)",       \
@@ -245,7 +245,7 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
 #ifdef __GNUC__
 
 #define g_return_if_fail(expr)         G_STMT_START{                   \
-     if (!(expr))                                                      \
+     if (expr) else                                                    \
        {                                                               \
         g_log (G_LOG_DOMAIN,                                           \
                G_LOG_LEVEL_CRITICAL,                                   \
@@ -258,7 +258,7 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
        };                              }G_STMT_END
 
 #define g_return_val_if_fail(expr,val) G_STMT_START{                   \
-     if (!(expr))                                                      \
+     if (expr) else                                                    \
        {                                                               \
         g_log (G_LOG_DOMAIN,                                           \
                G_LOG_LEVEL_CRITICAL,                                   \
@@ -291,7 +291,7 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
 #else /* !__GNUC__ */
 
 #define g_return_if_fail(expr)         G_STMT_START{           \
-     if (!(expr))                                              \
+     if (expr) else                                            \
        {                                                       \
         g_log (G_LOG_DOMAIN,                                   \
                G_LOG_LEVEL_CRITICAL,                           \
@@ -303,7 +303,7 @@ GPrintFunc      g_set_printerr_handler  (GPrintFunc      func);
        };                              }G_STMT_END
 
 #define g_return_val_if_fail(expr, val)        G_STMT_START{           \
-     if (!(expr))                                              \
+     if (expr) else                                            \
        {                                                       \
         g_log (G_LOG_DOMAIN,                                   \
                G_LOG_LEVEL_CRITICAL,                           \