aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/0001-write.c-chain_frchains_together_1-Reorder-assertion-.patch
blob: ffe6852dffa2a356355449f2464301356215273b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From c50d883cb61ff9917464cb695a0fd83fdb0f9c20 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@bigpond.net.au>
Date: Mon, 21 Jan 2013 13:48:31 +0000
Subject: [PATCH] write.c (chain_frchains_together_1): Reorder assertion to
 avoid uninit warning.

Upstream-Status: Backport from 2.23.2
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 gas/write.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gas/write.c b/gas/write.c
index a467147..56ebb6c 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -406,8 +406,8 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
 	  prev_fix = frchp->fix_tail;
 	}
     }
-  gas_assert (prev_frag->fr_type != 0);
-  gas_assert (prev_frag != &dummy);
+  gas_assert (prev_frag != &dummy
+	      && prev_frag->fr_type != 0);
   prev_frag->fr_next = 0;
   return prev_frag;
 }
-- 
2.3.5