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 /lib/framework.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 'lib/framework.exp')
-rw-r--r-- | lib/framework.exp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/framework.exp b/lib/framework.exp index 5cf0201..8404b38 100644 --- a/lib/framework.exp +++ b/lib/framework.exp @@ -303,7 +303,7 @@ proc clone_output { message } { } regsub "^\[ \t\]*(\[^ \t\]+).*$" "$message" "\\1" firstword - switch -glob "$firstword" { + switch -glob -- "$firstword" { "PASS:" - "XFAIL:" - "KFAIL:" - @@ -628,7 +628,7 @@ proc clear_xfail { args } { set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] - switch -glob $sub_arg { + switch -glob -- $sub_arg { "*-*-*" { # is a configuration triplet if {[istarget $sub_arg]} { set xfail_flag 0 @@ -649,7 +649,7 @@ proc clear_kfail { args } { set argc [ llength $args ] for { set i 0 } { $i < $argc } { incr i } { set sub_arg [ lindex $args $i ] - switch -glob $sub_arg { + switch -glob -- $sub_arg { "*-*-*" { # is a configuration triplet if {[istarget $sub_arg]} { set kfail_flag 0 @@ -717,7 +717,7 @@ proc record_test { type message args } { xml_output " </test>" } - switch $type { + switch -- $type { PASS { if {$prms_id} { set message [concat $message "\t(PRMS $prms_id)"] |