python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / glibc / 2.23 / 0002-gcc6.patch
blobf831cae2caa0755a4122fbdb873c3ee2a72ba8da
1 From 5769d5d17cdb4770f1e08167b76c1684ad4e1f73 Mon Sep 17 00:00:00 2001
2 From: Yvan Roux <yvan.roux@linaro.org>
3 Date: Fri, 15 Apr 2016 13:29:26 +0200
4 Subject: [PATCH 1/1] Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses
6 (cherry picked from commit df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c)
8 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
9 (downloaded from upstream git repo and removed changes to Changelog:
10 https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5769d5d17cdb4770f1e08167b76c1684ad4e1f73;hp=f1e182acaaa84e844eb96462a92ba532e1c1fff4)
11 ---
12 ChangeLog | 5 +++++
13 nis/nis_call.c | 20 +++++++++++---------
14 stdlib/setenv.c | 26 ++++++++++++++------------
15 3 files changed, 30 insertions(+), 21 deletions(-)
17 diff --git a/nis/nis_call.c b/nis/nis_call.c
18 index 3fa37e4..cb7839a 100644
19 --- a/nis/nis_call.c
20 +++ b/nis/nis_call.c
21 @@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent,
22 /* Choose which entry should be evicted from the cache. */
23 loc = &nis_server_cache[0];
24 if (*loc != NULL)
25 - for (i = 1; i < 16; ++i)
26 - if (nis_server_cache[i] == NULL)
27 - {
28 + {
29 + for (i = 1; i < 16; ++i)
30 + if (nis_server_cache[i] == NULL)
31 + {
32 + loc = &nis_server_cache[i];
33 + break;
34 + }
35 + else if ((*loc)->uses > nis_server_cache[i]->uses
36 + || ((*loc)->uses == nis_server_cache[i]->uses
37 + && (*loc)->expires > nis_server_cache[i]->expires))
38 loc = &nis_server_cache[i];
39 - break;
40 - }
41 - else if ((*loc)->uses > nis_server_cache[i]->uses
42 - || ((*loc)->uses == nis_server_cache[i]->uses
43 - && (*loc)->expires > nis_server_cache[i]->expires))
44 - loc = &nis_server_cache[i];
45 + }
46 old = *loc;
47 *loc = new;
49 diff --git a/stdlib/setenv.c b/stdlib/setenv.c
50 index da61ee0..e66045f 100644
51 --- a/stdlib/setenv.c
52 +++ b/stdlib/setenv.c
53 @@ -278,18 +278,20 @@ unsetenv (const char *name)
54 ep = __environ;
55 if (ep != NULL)
56 while (*ep != NULL)
57 - if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
58 - {
59 - /* Found it. Remove this pointer by moving later ones back. */
60 - char **dp = ep;
62 - do
63 - dp[0] = dp[1];
64 - while (*dp++);
65 - /* Continue the loop in case NAME appears again. */
66 - }
67 - else
68 - ++ep;
69 + {
70 + if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
71 + {
72 + /* Found it. Remove this pointer by moving later ones back. */
73 + char **dp = ep;
75 + do
76 + dp[0] = dp[1];
77 + while (*dp++);
78 + /* Continue the loop in case NAME appears again. */
79 + }
80 + else
81 + ++ep;
82 + }
84 UNLOCK;
86 --
87 1.7.1