[pushed] gdb/testsuite: fix tcllint errors in gdb.base/startup-hints.exp
Commit Message
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
base-commit: ad15f9c23401cf06504b1765aeaf8db9dd404ad8
Comments
On 12/15/25 10:28 PM, Simon Marchi wrote:
> 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]
>
Hi Simon,
thanks for the fix.
I noticed a tcllint->tclint typo in $subject, so I propose to add a
corresponding entry in the codespell dictionary (
https://sourceware.org/pipermail/gdb-patches/2025-December/223492.html ).
Thanks,
- Tom
> Change-Id: Id21ff11ced82b11c11d0eb0d186fe6fc5c4c06c5
> ---
> gdb/testsuite/gdb.base/startup-hints.exp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/startup-hints.exp b/gdb/testsuite/gdb.base/startup-hints.exp
> index 0addf3769a2d..08d1a8fc0e7c 100644
> --- a/gdb/testsuite/gdb.base/startup-hints.exp
> +++ b/gdb/testsuite/gdb.base/startup-hints.exp
> @@ -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 |"
> }
>
> base-commit: ad15f9c23401cf06504b1765aeaf8db9dd404ad8
@@ -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 |"
}