From 864a14bae31212fcfbe0b297becf3dfbbc6f57b9 Mon Sep 17 00:00:00 2001 From: Darin Adler Date: Mon, 11 Feb 2002 22:33:55 +0000 Subject: [PATCH] Use "if (expr) { } else" as I meant to in the first place. The other form * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the first place. The other form can trigger warnings in some compilers that suspect a ";" after "if (expr)" is an error. --- ChangeLog | 6 ++++++ ChangeLog.pre-2-0 | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-12 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ glib/gmessages.h | 12 ++++++------ 9 files changed, 54 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7b6fc3d2f..e14bd41a7 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2002-02-11 Darin Adler + + * glib/gmessages.h: Use "if (expr) { } else" as I meant to in the + first place. The other form can trigger warnings in some compilers + that suspect a ";" after "if (expr)" is an error. + 2002-02-11 Manish Singh * glib/gmessages.h: need statement terminators for the if clauses for diff --git a/glib/gmessages.h b/glib/gmessages.h index 2794028c3..3b82b0591 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -193,7 +193,7 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func); #ifdef __GNUC__ #define g_assert(expr) G_STMT_START{ \ - if (expr); else \ + 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); else \ + 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); else \ + 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); else \ + 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); else \ + 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); else \ + if (expr) { } else \ { \ g_log (G_LOG_DOMAIN, \ G_LOG_LEVEL_CRITICAL, \ -- 2.34.1