aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2016-03-29 10:52:29 +1100
committerBen Elliston <bje@gnu.org>2016-03-29 10:52:29 +1100
commit85e283265453b698f1f5a22b2eeedc0c05aafe91 (patch)
tree9e9a52b78d6078cc5cd9512699015d42f016d5d4 /lib
parent569f8718b534a2cd9511a7d640352eb0126ff492 (diff)
More fixes identified by the Frink static analyser:
(1) use -- in switch commands for safety, (2) add braces around exprs, (3) replace abbreviated "info proc" with "info procs", (4) use -- in regexp commands for safety where the expression is a variable that could begin with '-'.
Diffstat (limited to 'lib')
-rw-r--r--lib/dg.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/dg.exp b/lib/dg.exp
index 6a54b46..ab5816d 100644
--- a/lib/dg.exp
+++ b/lib/dg.exp
@@ -569,7 +569,7 @@ proc dg-runtest { testcases options default-extra-options } {
#
proc dg-trim-dirname { dir_name file_name } {
set special_character "\[\?\+\-\.\(\)\$\|\]"
- regsub -all $special_character $dir_name "\\\\&" dir_name
+ regsub -all -- $special_character $dir_name "\\\\&" dir_name
regsub "^$dir_name/?" $file_name "" file_name
return $file_name
}
@@ -587,7 +587,7 @@ proc dg-test { args } {
global dg-do-what-default dg-interpreter-batch-mode dg-linenum-format
global errorCode errorInfo
global tool
- global srcdir ;# eg: /calvin/dje/build/gcc/./testsuite/
+ global srcdir
global host_triplet target_triplet
set keep 0