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 88291ba..f766329 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 ce446fd..52b63ee 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) != "" \