From 1a404632277c06f2077ad146b08cc0766525c83b Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Fri, 12 Sep 2025 15:04:50 +0200 Subject: [PATCH] [gdb/testsuite, tclint] Fix lib/tuiterm.exp Running tclint on lib/tuiterm.exp shows a few problems: ... $ tclint --ignore line-length gdb/testsuite/lib/tuiterm.exp tuiterm.exp:105:3: expression with substitutions should be enclosed by \ braces [unbraced-expr] tuiterm.exp:1576:28: unnecessary command substitution within expression \ [redundant-expr] tuiterm.exp:1582:25: unnecessary command substitution within expression \ [redundant-expr] ... Fix these. Tested on aarch64-linux. --- gdb/testsuite/lib/tuiterm.exp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp index e1af2231b94..97017c779e6 100644 --- a/gdb/testsuite/lib/tuiterm.exp +++ b/gdb/testsuite/lib/tuiterm.exp @@ -102,8 +102,8 @@ proc Term::_ctl_0x07 {} { # Return 1 if tuiterm has the bw/auto_left_margin enabled. proc Term::_have_bw {} { return [expr \ - [string equal $Term::_TERM "ansiw"] \ - || [string equal $Term::_TERM "ansis"]] + { [string equal $Term::_TERM "ansiw"] \ + || [string equal $Term::_TERM "ansis"] }] } # Backspace. @@ -1573,13 +1573,13 @@ proc Term::get_region { x y width height sep { attrs false } } { # Grab the contents of the box, join each line together # using $sep. set result "" - for {set yy $y} {$yy < [expr {$y + $height}]} {incr yy} { + for {set yy $y} {$yy < $y + $height} {incr yy} { if {$yy > $y} { # Add the end of line sequence only if this isn't the # first line. append result $sep } - for {set xx $x} {$xx < [expr {$x + $width}]} {incr xx} { + for {set xx $x} {$xx < $x + $width} {incr xx} { if { $attrs } { set char_attrs [lindex $_chars($xx,$yy) 1] append result [apply_attrs region_attrs $char_attrs] -- 2.47.3