ld/testsuite: Initialise a variable to prevent tcl errors
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 12 Apr 2016 10:04:19 +0000 (11:04 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 13 Apr 2016 14:22:42 +0000 (15:22 +0100)
In some cases a variable could be left uninitialised and then an attempt
made to read this variable, resulting in a tcl error.  This commit
initialises the variable in all cases.

ld/ChangeLog:

* testsuite/lib/ld-lib.exp (run_dump_test): Initialise
check_ld(terminal).

ld/ChangeLog
ld/testsuite/lib/ld-lib.exp

index 88291badb763298e37bb5e9ca4d596fa756d665b..f7663297f2de8fe921ba54913fbdd73e4347b57b 100644 (file)
@@ -1,3 +1,8 @@
+2016-04-13  Andrew Burgess  <andrew.burgess@embecosm.com>
+
+       * testsuite/lib/ld-lib.exp (run_dump_test): Initialise
+       check_ld(terminal).
+
 2016-04-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR ld/19774
index ce446fd252830b8a1e873a4c2107076e138d352c..52b63ee6a8c460f903bb533a8106cca343cf799e 100644 (file)
@@ -875,6 +875,7 @@ proc run_dump_test { name {extra_options {}} } {
     }
 
     set check_ld(source) ""
+    set check_ld(terminal) 0
     if { $opts(error) != "" \
          || $opts(warning) != "" \
          || $opts(error_output) != "" \