[evolution-ews] Address some of the clang compiler warnings



commit d9a22f0b845e6a1d14d805b4d065628affd68b5d
Author: Milan Crha <mcrha redhat com>
Date:   Tue Jun 7 11:58:30 2016 +0200

    Address some of the clang compiler warnings

 configure.ac                     |    9 ++++++++-
 src/calendar/e-cal-backend-ews.c |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8f76ab2..0e79db0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -120,6 +120,7 @@ dnl ***********************
 dnl Compiler Warning Flags
 dnl ***********************
 proposed_warning_flags=
+append_warning_flags=
 
 if test "x$enable_maintainer_mode" = "xyes" ; then
        proposed_warning_flags="-Wall -Wextra -Wdeprecated-declarations"
@@ -128,6 +129,10 @@ else
        proposed_warning_flags="-Wno-deprecated-declarations"
 fi
 
+if test "$CC" = "clang" ; then
+       append_warning_flags="-Wno-parentheses-equality -Wno-format-nonliteral"
+fi
+
 AS_COMPILER_FLAGS(WARNING_FLAGS,
        "$proposed_warning_flags
        -Wno-missing-field-initializers
@@ -138,7 +143,8 @@ AS_COMPILER_FLAGS(WARNING_FLAGS,
        -Wformat -Wformat-nonliteral -Wformat-security -Winit-self
        -Wmissing-declarations -Wmissing-include-dirs
        -Wmissing-noreturn -Wnested-externs -Wpointer-arith
-       -Wundef -Wwrite-strings")
+       -Wundef -Wwrite-strings
+       $append_warning_flags")
 AC_SUBST(WARNING_FLAGS)
 
 dnl Other useful compiler warnings for test builds only.
@@ -149,6 +155,7 @@ dnl -Wshadow
 dnl    -Wredundant-decls
 
 CFLAGS="$CFLAGS $WARNING_FLAGS"
+AC_SUBST(CFLAGS)
 
 dnl *******************************
 dnl Check for --enable-strict
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index 02ba9cc..dbf1d0f 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -3153,7 +3153,7 @@ add_item_to_cache (ECalBackendEws *cbews,
 
                        /*status*/
                        ews_task_status = e_ews_item_get_status (item);
-                       if (!g_strcmp0 (ews_task_status, "NotStarted") == 0) {
+                       if (g_strcmp0 (ews_task_status, "NotStarted") != 0) {
                                if (g_strcmp0 (ews_task_status, "Completed") == 0)
                                        status = ICAL_STATUS_COMPLETED;
                                else if (g_strcmp0 (ews_task_status, "InProgress") == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]