diff options
author | Ben Elliston <bje@gnu.org> | 2016-03-28 11:51:41 +1100 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2016-03-28 11:51:41 +1100 |
commit | 883ffd3e6dcedfccb39969fd9791e70c901410ec (patch) | |
tree | c9026d0e7d39068361acf297d37b88725eae6b8a /runtest.exp | |
parent | a57bfcfb68c3ac388a5ba5b2baca8e8c1195690b (diff) | |
download | dejagnu-883ffd3e6dcedfccb39969fd9791e70c901410ec.zip dejagnu-883ffd3e6dcedfccb39969fd9791e70c901410ec.tar.gz dejagnu-883ffd3e6dcedfccb39969fd9791e70c901410ec.tar.bz2 |
* runtest.exp: Fixes identified by the Frink static analyser:
(1) use -- in switch commands for safety,
(2) remove unreachable return commands after error commands,
(3) replace abbreviated "info proc" with "info procs",
(4) use -- in unset commands for safety where the variable name
is itself a variable.
* lib/dg.exp: Likewise.
* lib/debugger.exp: Likewise.
* lib/framework.exp: Likewise.
* lib/remote.exp: Likewise.
* lib/target.exp: Likewise.
* lib/targetdb.exp: Likewise.
* lib/telnet.exp: Likewise.
* lib/utils.exp: Likewise.
Diffstat (limited to 'runtest.exp')
-rw-r--r-- | runtest.exp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtest.exp b/runtest.exp index d435db8..6ec5e23 100644 --- a/runtest.exp +++ b/runtest.exp @@ -700,7 +700,7 @@ if {[expr {$build_triplet == "" && $host_triplet == ""}]} { exit 1 } catch "exec $config_guess" build_triplet - switch $build_triplet { + switch -- $build_triplet { "No uname command or uname output not recognized" - "Unable to guess system type" { verbose "WARNING: Uname output not recognized" @@ -826,7 +826,7 @@ proc setup_host_hook { name } { unset board unset board_type push_host $name - if { [info proc ${name}_init] != "" } { + if { [info procs ${name}_init] != "" } { ${name}_init $name } } @@ -843,7 +843,7 @@ proc setup_build_hook { name } { unset board unset board_type push_build $name - if { [info proc ${name}_init] != "" } { + if { [info procs ${name}_init] != "" } { ${name}_init $name } } @@ -1192,7 +1192,7 @@ for { set i 0 } { $i < $argc } { incr i } { default { if {[info exists tool]} { - if { [info proc ${tool}_option_proc] != "" } { + if { [info procs ${tool}_option_proc] != "" } { if {[${tool}_option_proc $option]} { continue } @@ -1898,7 +1898,7 @@ foreach current_target $target_list { set [lindex $varval 0] [lindex $varval 1] } else { verbose "Restoring [lindex $varval 0] to `unset'" 4 - unset [lindex $varval 0] + unset -- [lindex $varval 0] } } } |