systemd/0040-test-hashmap-fix-gcc5-warning.patch
Zbigniew Jędrzejewski-Szmek 399a2a87d9 Backport a bunch of patches
2015-03-14 12:08:23 -04:00

33 lines
1.2 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 6af0a4ba45b63072df70ca4d6a8fc5790c66e149 Mon Sep 17 00:00:00 2001
From: Daniel Mack <daniel@zonque.org>
Date: Tue, 24 Feb 2015 16:24:14 +0100
Subject: [PATCH] test-hashmap: fix gcc5 warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
gcc5 spits out a warning about test-hashmap.c:
CC src/test/test-hashmap.o
src/test/test-hashmap.c: In function test_string_compare_func:
src/test/test-hashmap.c:76:79: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
(cherry picked from commit 4b3eff61640672bf0b19cb8cdd88ce5e84dcda1c)
---
src/test/test-hashmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c
index 6900da9e89..351563b967 100644
--- a/src/test/test-hashmap.c
+++ b/src/test/test-hashmap.c
@@ -75,7 +75,7 @@ static void test_trivial_compare_func(void) {
}
static void test_string_compare_func(void) {
- assert_se(!string_compare_func("fred", "wilma") == 0);
+ assert_se(string_compare_func("fred", "wilma") != 0);
assert_se(string_compare_func("fred", "fred") == 0);
}