Blame SOURCES/0060-shared-condition-fix-gcc5-warning.patch

17b0f1
From 2ee0903b0a00dd4a13af8a26ee5fb435c9895568 Mon Sep 17 00:00:00 2001
17b0f1
From: Daniel Mack <daniel@zonque.org>
17b0f1
Date: Fri, 27 Feb 2015 20:05:26 +0100
17b0f1
Subject: [PATCH] shared/condition: fix gcc5 warning
17b0f1
MIME-Version: 1.0
17b0f1
Content-Type: text/plain; charset=UTF-8
17b0f1
Content-Transfer-Encoding: 8bit
17b0f1
17b0f1
Fixes the warning below.
17b0f1
17b0f1
src/shared/condition.c: In function ‘condition_new’:
17b0f1
src/shared/condition.c:47:27: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
17b0f1
         assert(!parameter == (type == CONDITION_NULL));
17b0f1
                           ^
17b0f1
src/shared/macro.h:42:44: note: in definition of macro ‘_unlikely_’
17b0f1
 #define _unlikely_(x) (__builtin_expect(!!(x),0))
17b0f1
                                            ^
17b0f1
src/shared/macro.h:226:22: note: in expansion of macro ‘assert_se’
17b0f1
 #define assert(expr) assert_se(expr)
17b0f1
                      ^
17b0f1
src/shared/condition.c:47:9: note: in expansion of macro ‘assert’
17b0f1
         assert(!parameter == (type == CONDITION_NULL));
17b0f1
         ^
17b0f1
17b0f1
(cherry picked from commit 8a9c6071cb7467170010f0287672c987981bdf9c)
17b0f1
---
17b0f1
 src/shared/condition.c | 2 +-
17b0f1
 1 file changed, 1 insertion(+), 1 deletion(-)
17b0f1
17b0f1
diff --git a/src/shared/condition.c b/src/shared/condition.c
17b0f1
index da7560f05f..796cc520d7 100644
17b0f1
--- a/src/shared/condition.c
17b0f1
+++ b/src/shared/condition.c
17b0f1
@@ -46,7 +46,7 @@ Condition* condition_new(ConditionType type, const char *parameter, bool trigger
17b0f1
 
17b0f1
         assert(type >= 0);
17b0f1
         assert(type < _CONDITION_TYPE_MAX);
17b0f1
-        assert(!parameter == (type == CONDITION_NULL));
17b0f1
+        assert((!parameter) == (type == CONDITION_NULL));
17b0f1
 
17b0f1
         c = new0(Condition, 1);
17b0f1
         if (!c)