[evolution-patches] e-plugin.c: Fix for compiler warning (RH bug #162136)
- From: David Malcolm <dmalcolm redhat com>
- To: Evolution Patches <evolution-patches ximian com>
- Cc:
- Subject: [evolution-patches] e-plugin.c: Fix for compiler warning (RH bug #162136)
- Date: Thu, 18 Aug 2005 16:41:39 -0400
Attached patch fixes a compiler warning under GCC4:
e-plugin.c:93: warning: comparisons like X<=Y<=Z do not have their
mathematical meaning
(as noted in
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=162136 )
Have I correctly understood the intent of this code? OK to commit?
Dave
Index: e-util/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/e-util/ChangeLog,v
retrieving revision 1.552
diff -u -p -r1.552 ChangeLog
--- e-util/ChangeLog 18 Aug 2005 00:40:37 -0000 1.552
+++ e-util/ChangeLog 18 Aug 2005 20:33:47 -0000
@@ -1,3 +1,7 @@
+2005-08-18 David Malcolm <dmalcolm redhat com>
+
+ * e-plugin.c (ep_set_enabled): Fix compiler warning on early bailout
+
2005-08-18 Tor Lillqvist <tml novell com>
* e-iconv.c (e_iconv_init): Use g_get_charset() on Win32 to get
Index: e-util/e-plugin.c
===================================================================
RCS file: /cvs/gnome/evolution/e-util/e-plugin.c,v
retrieving revision 1.16
diff -u -p -r1.16 e-plugin.c
--- e-util/e-plugin.c 25 May 2005 10:51:36 -0000 1.16
+++ e-util/e-plugin.c 18 Aug 2005 20:33:47 -0000
@@ -93,7 +93,8 @@ ep_check_enabled(const char *id)
static void
ep_set_enabled(const char *id, int state)
{
- if ((state == 0) == ep_check_enabled(id) == 0)
+ /* Bail out if no change to state, when expressed as a boolean: */
+ if ((state == 0) == (ep_check_enabled(id) == 0))
return;
if (state) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]