1 |
commit: 7d364f3f20e74aab152288d92cef1e0bba513240 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 29 19:36:08 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 29 19:36:08 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=7d364f3f |
7 |
|
8 |
scanelf: add paren to quiet new gcc-5 warning |
9 |
|
10 |
Newer gcc versions throw a warning on code that is written how we want |
11 |
(comparing the result of !strcmp to a variable). Add a set of paren to |
12 |
make gcc happy. |
13 |
|
14 |
scanelf.c: In function 'scanelf_file_needed_lib': |
15 |
scanelf.c:1083:43: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] |
16 |
if (!strcmp(find_lib_name, needed) == invert) \ |
17 |
^ |
18 |
|
19 |
scanelf.c | 2 +- |
20 |
1 file changed, 1 insertion(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/scanelf.c b/scanelf.c |
23 |
index a50b6e4..7219f1c 100644 |
24 |
--- a/scanelf.c |
25 |
+++ b/scanelf.c |
26 |
@@ -1080,7 +1080,7 @@ static const char *scanelf_file_needed_lib(elfobj *elf, char *found_needed, char |
27 |
int invert = 1; \ |
28 |
if (find_lib_name[0] == '!') \ |
29 |
invert = 0, ++find_lib_name; \ |
30 |
- if (!strcmp(find_lib_name, needed) == invert) \ |
31 |
+ if ((!strcmp(find_lib_name, needed)) == invert) \ |
32 |
++matched; \ |
33 |
} \ |
34 |
\ |