]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: fix tcllint errors in gdb.base/startup-hints.exp
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Dec 2025 21:27:18 +0000 (16:27 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 15 Dec 2025 21:27:40 +0000 (16:27 -0500)
Fix:

    gdb/testsuite/gdb.base/startup-hints.exp:61:44: expression with substitutions should be enclosed by braces [unbraced-expr]
    gdb/testsuite/gdb.base/startup-hints.exp:64:28: expression with substitutions should be enclosed by braces [unbraced-expr]

Change-Id: Id21ff11ced82b11c11d0eb0d186fe6fc5c4c06c5

gdb/testsuite/gdb.base/startup-hints.exp

index 0addf3769a2d47d02b37f26508dd5d353988edb1..08d1a8fc0e7c56c8a45b792b5b0b8190ea9e7398 100644 (file)
@@ -58,10 +58,10 @@ proc build_hint_re { width } {
 
        # Place the lines into a box, padding with whitespace so that
        # the sides are correctly aligned.
-       set top_bottom "+[string repeat "-" [expr $width - 2]]+"
+       set top_bottom "+[string repeat "-" [expr {$width - 2}]]+"
        set lines [list $top_bottom]
        foreach m $msg {
-           set space_count [expr $width - 4 - [string length $m]]
+           set space_count [expr {$width - 4 - [string length $m]}]
            set spaces [string repeat " " $space_count]
            lappend lines "| $m$spaces |"
        }