[gdb/testsuite, tclint] Fix gdb.guile

Running tclint on the test-cases in gdb.guile shows a few problems.

Fix these.

Tested on x86_64-linux.
diff --git a/gdb/tclint.toml b/gdb/tclint.toml
index 2aae9eb..4beb4dd 100644
--- a/gdb/tclint.toml
+++ b/gdb/tclint.toml
@@ -26,7 +26,6 @@
 "gdb/testsuite/gdb.cp",
 "gdb/testsuite/gdb.dwarf2",
 "gdb/testsuite/gdb.fortran",
-"gdb/testsuite/gdb.guile",
 "gdb/testsuite/gdb.mi",
 "gdb/testsuite/gdb.python",
 "gdb/testsuite/gdb.reverse",
diff --git a/gdb/testsuite/gdb.guile/scm-arch.exp b/gdb/testsuite/gdb.guile/scm-arch.exp
index bd64c4b..752c2d8 100644
--- a/gdb/testsuite/gdb.guile/scm-arch.exp
+++ b/gdb/testsuite/gdb.guile/scm-arch.exp
@@ -23,7 +23,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
    return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-block.exp b/gdb/testsuite/gdb.guile/scm-block.exp
index 266e714..65e2275 100644
--- a/gdb/testsuite/gdb.guile/scm-block.exp
+++ b/gdb/testsuite/gdb.guile/scm-block.exp
@@ -26,7 +26,7 @@
     return -1
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
index 8694530..3b90d99 100644
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -32,7 +32,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -65,7 +65,7 @@
 	"scm-breakpoint\.c:${mult_line}*" \
 	"check multiply breakpoint location"
 
-    # Check hit and ignore counts. 
+    # Check hit and ignore counts.
     gdb_test "guile (print (breakpoint-hit-count mult-bkpt))" \
 	"= 1" "check multiply breakpoint hit count"
     gdb_scm_test_silent_cmd "guile (set-breakpoint-ignore-count! mult-bkpt 4)" \
@@ -105,7 +105,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -141,7 +141,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -188,7 +188,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -238,10 +238,10 @@
     clean_restart ${testfile}
 
     # Disable hardware watchpoints if necessary.
-    if [target_info exists gdb,no_hardware_watchpoints] {
+    if {[target_info exists gdb,no_hardware_watchpoints]} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -273,10 +273,10 @@
     clean_restart ${testfile}
 
     # Disable hardware watchpoints if necessary.
-    if [target_info exists gdb,no_hardware_watchpoints] {
+    if {[target_info exists gdb,no_hardware_watchpoints]} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -304,10 +304,10 @@
     clean_restart ${testfile}
 
     # Disable hardware watchpoints if necessary.
-    if [target_info exists gdb,no_hardware_watchpoints] {
+    if {[target_info exists gdb,no_hardware_watchpoints]} {
 	gdb_test_no_output "set can-use-hw-watchpoints 0" ""
     }
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -451,7 +451,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
@@ -490,7 +490,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return 0
     }
     delete_breakpoints
@@ -556,7 +556,7 @@
     # Start with a fresh gdb.
     clean_restart ${testfile}
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.guile/scm-cmd.exp b/gdb/testsuite/gdb.guile/scm-cmd.exp
index 3709cb1..36abb00 100644
--- a/gdb/testsuite/gdb.guile/scm-cmd.exp
+++ b/gdb/testsuite/gdb.guile/scm-cmd.exp
@@ -26,7 +26,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-disasm.exp b/gdb/testsuite/gdb.guile/scm-disasm.exp
index 5541a60..bd551ad 100644
--- a/gdb/testsuite/gdb.guile/scm-disasm.exp
+++ b/gdb/testsuite/gdb.guile/scm-disasm.exp
@@ -23,7 +23,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
    return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-equal.exp b/gdb/testsuite/gdb.guile/scm-equal.exp
index 0450d62..2a87139 100644
--- a/gdb/testsuite/gdb.guile/scm-equal.exp
+++ b/gdb/testsuite/gdb.guile/scm-equal.exp
@@ -26,7 +26,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
    return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-frame-args.exp b/gdb/testsuite/gdb.guile/scm-frame-args.exp
index c519087..9c1e831 100644
--- a/gdb/testsuite/gdb.guile/scm-frame-args.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-args.exp
@@ -23,7 +23,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-frame-inline.exp b/gdb/testsuite/gdb.guile/scm-frame-inline.exp
index a2fe11d..02884f7 100644
--- a/gdb/testsuite/gdb.guile/scm-frame-inline.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-inline.exp
@@ -23,7 +23,7 @@
     return
 }
 
-if ![runto_main] {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-frame.exp b/gdb/testsuite/gdb.guile/scm-frame.exp
index 9a27c42..821567e 100644
--- a/gdb/testsuite/gdb.guile/scm-frame.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame.exp
@@ -28,7 +28,7 @@
 
 # The following tests require execution.
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-iterator.exp b/gdb/testsuite/gdb.guile/scm-iterator.exp
index 43d776b..188b5ef 100644
--- a/gdb/testsuite/gdb.guile/scm-iterator.exp
+++ b/gdb/testsuite/gdb.guile/scm-iterator.exp
@@ -26,7 +26,7 @@
     return -1
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-lazy-string.exp b/gdb/testsuite/gdb.guile/scm-lazy-string.exp
index c5d09ae..eaee001 100644
--- a/gdb/testsuite/gdb.guile/scm-lazy-string.exp
+++ b/gdb/testsuite/gdb.guile/scm-lazy-string.exp
@@ -31,7 +31,7 @@
 
 # The following tests require execution.
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-math.exp b/gdb/testsuite/gdb.guile/scm-math.exp
index 8b21909..17b54d1 100644
--- a/gdb/testsuite/gdb.guile/scm-math.exp
+++ b/gdb/testsuite/gdb.guile/scm-math.exp
@@ -167,21 +167,21 @@
 # TCL 8.5 required here.  Use lookup table instead?
 
 proc get_max_int { size } {
-    return [expr "(1 << ($size - 1)) - 1"]
+    return [expr {(1 << ($size - 1)) - 1}]
 }
 
 # Return the min signed int of size SIZE.
 # TCL 8.5 required here.  Use lookup table instead?
 
 proc get_min_int { size } {
-    return [expr "-(1 << ($size - 1))"]
+    return [expr {-(1 << ($size - 1))}]
 }
 
 # Return the max unsigned int of size SIZE.
 # TCL 8.5 required here.  Use lookup table instead?
 
 proc get_max_uint { size } {
-    return [expr "(1 << $size) - 1"]
+    return [expr {(1 << $size) - 1}]
 }
 
 # Helper routine for test_value_numeric_ranges.
@@ -252,7 +252,7 @@
 
 proc test_make_pointer_value { size } {
     set max [get_max_uint $size]
-    set max_hex [string repeat "f" [expr "$size / 4"]]
+    set max_hex [string repeat "f" [expr {$size / 4}]]
 
     gdb_test "gu (print (make-value $max #:type void-pointer-type))" \
 	"= 0x$max_hex" "test make-value void* max"
@@ -337,7 +337,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
    return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-objfile-script.exp b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
index b6d9369..88cd18c 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
@@ -41,7 +41,7 @@
 # Verify gdb loaded the script.
 gdb_test "info auto-load guile-scripts" "Yes.*/${testfile}-gdb.scm.*"
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-objfile.exp b/gdb/testsuite/gdb.guile/scm-objfile.exp
index e0018c4..09256df 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile.exp
@@ -26,7 +26,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp
index acd78b9..5483b81 100644
--- a/gdb/testsuite/gdb.guile/scm-parameter.exp
+++ b/gdb/testsuite/gdb.guile/scm-parameter.exp
@@ -26,7 +26,7 @@
 gdb_install_guile_module
 
 proc scm_param_test_maybe_no_output { command pattern args } {
-    if [string length $pattern] {
+    if {[string length $pattern]} {
 	gdb_test $command $pattern $args
     } else {
 	gdb_test_no_output $command $args
@@ -110,7 +110,7 @@
     gdb_test_no_output "set print test-enum-param two"
     gdb_test "show print test-enum-param" "The state of the enum is two." "show new value"
     gdb_test "guile (print (parameter-value test-enum-param))" "two" "enum parameter value, two"
-    gdb_test "set print test-enum-param three" "Undefined item: \"three\".*" "set invalid enum parameter" 
+    gdb_test "set print test-enum-param three" "Undefined item: \"three\".*" "set invalid enum parameter"
 }
 
 # Test integer parameters.
@@ -306,7 +306,7 @@
     gdb_test_no_output "set test-file-param bar.txt"
     gdb_test "show test-file-param" "The name of the file is bar.txt." "show new value"
     gdb_test "guile (print (parameter-value test-file-param))" "bar.txt" " new parameter value"
-    gdb_test "set test-file-param" "Argument required.*" 
+    gdb_test "set test-file-param" "Argument required.*"
 }
 
 # Test a parameter that is not documented.
diff --git a/gdb/testsuite/gdb.guile/scm-ports.exp b/gdb/testsuite/gdb.guile/scm-ports.exp
index c67ebd2..a0af289 100644
--- a/gdb/testsuite/gdb.guile/scm-ports.exp
+++ b/gdb/testsuite/gdb.guile/scm-ports.exp
@@ -26,7 +26,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
    return
 }
 
@@ -84,7 +84,7 @@
 # Test read/write of memory ports.
 
 proc test_mem_port_rw { buffered } {
-    if $buffered {
+    if {$buffered} {
 	set mode "r+"
     } else {
 	set mode "r+0"
@@ -115,7 +115,7 @@
 	"define new-value"
     gdb_test "guile (print (put-bytevector rw-mem-port (make-bytevector 1 new-value)))" \
 	"= #<unspecified>"
-    if $buffered {
+    if {$buffered} {
 	# Value shouldn't be in memory yet.
 	gdb_test "guile (print (value=? (parse-and-eval \"*(char*) \$sp\") byte-at-sp))" \
 	    "= #t" \
diff --git a/gdb/testsuite/gdb.guile/scm-pretty-print.exp b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
index b95c0cb..62fb8e2 100644
--- a/gdb/testsuite/gdb.guile/scm-pretty-print.exp
+++ b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
@@ -36,7 +36,7 @@
 	clean_restart
 	gdb_load $exefile
 
-	if ![gdb_guile_runto_main] {
+	if {![gdb_guile_runto_main]} {
 	    return
 	}
 
@@ -117,7 +117,7 @@
 
 clean_restart $::testfile
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-section-script.exp b/gdb/testsuite/gdb.guile/scm-section-script.exp
index 4c0238d..3a68adc 100644
--- a/gdb/testsuite/gdb.guile/scm-section-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-section-script.exp
@@ -94,7 +94,7 @@
 gdb_test "info auto-load guile-scripts no-script-matches-this" \
   "No auto-load scripts matching no-script-matches-this."
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-symbol.exp b/gdb/testsuite/gdb.guile/scm-symbol.exp
index 96bd560..2ddd3f0 100644
--- a/gdb/testsuite/gdb.guile/scm-symbol.exp
+++ b/gdb/testsuite/gdb.guile/scm-symbol.exp
@@ -54,7 +54,7 @@
 gdb_test "guile (print (symbol-needs-frame? qq-var))" \
     "= #f" "print whether qq needs a frame"
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
@@ -143,7 +143,7 @@
 
 clean_restart ${::testfile}-cxx
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
@@ -172,7 +172,7 @@
 # test as it unloads the object file in GDB.
 # Start with a fresh gdb.
 clean_restart ${testfile}
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp
index 621bbbe..c19b460 100644
--- a/gdb/testsuite/gdb.guile/scm-symtab.exp
+++ b/gdb/testsuite/gdb.guile/scm-symtab.exp
@@ -27,7 +27,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
@@ -143,7 +143,7 @@
 # Test find-pc-line.
 # The following tests require execution.
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-type.exp b/gdb/testsuite/gdb.guile/scm-type.exp
index 640dd5b..d974c86 100644
--- a/gdb/testsuite/gdb.guile/scm-type.exp
+++ b/gdb/testsuite/gdb.guile/scm-type.exp
@@ -45,7 +45,7 @@
 	return 0
     }
 
-    if ![gdb_guile_runto_main] {
+    if {![gdb_guile_runto_main]} {
 	return 0
     }
     gdb_scm_test_silent_cmd "guile (use-modules (gdb iterator))" \
@@ -275,7 +275,7 @@
 if { [build_inferior "${binfile}" "c"] < 0 } {
     return
 }
-if ![restart_gdb "${binfile}"] {
+if {![restart_gdb "${binfile}"]} {
     return
 }
 
@@ -291,7 +291,7 @@
 if { [build_inferior "${binfile}-cxx" "c++"] < 0 } {
     return
 }
-if ![restart_gdb "${binfile}-cxx"] {
+if {![restart_gdb "${binfile}-cxx"]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-value-cc.exp b/gdb/testsuite/gdb.guile/scm-value-cc.exp
index 202f01e..f65be25 100644
--- a/gdb/testsuite/gdb.guile/scm-value-cc.exp
+++ b/gdb/testsuite/gdb.guile/scm-value-cc.exp
@@ -26,7 +26,7 @@
     return
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
    return
 }
 
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp
index d723aeb..ea77d8f 100644
--- a/gdb/testsuite/gdb.guile/scm-value.exp
+++ b/gdb/testsuite/gdb.guile/scm-value.exp
@@ -312,7 +312,7 @@
     clean_restart
     gdb_load ${exefile}
 
-    if ![gdb_guile_runto_main ] {
+    if {![gdb_guile_runto_main ]} {
 	return
     }
 
@@ -438,7 +438,7 @@
 
 # The following tests require execution.
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }
 
@@ -447,7 +447,7 @@
 test_strings
 test_value_after_death
 
-# Test either C or C++ values. 
+# Test either C or C++ values.
 
 test_subscript_regression "${binfile}" "c"
 
diff --git a/gdb/testsuite/gdb.guile/types-module.exp b/gdb/testsuite/gdb.guile/types-module.exp
index c9d7067..e8412cc 100644
--- a/gdb/testsuite/gdb.guile/types-module.exp
+++ b/gdb/testsuite/gdb.guile/types-module.exp
@@ -30,7 +30,7 @@
     return -1
 }
 
-if ![gdb_guile_runto_main] {
+if {![gdb_guile_runto_main]} {
     return
 }