]> git.feebdaed.xyz Git - 0xmirror/binutils-gdb.git/commitdiff
gdb/testsuite: fix tclint errors
authorAndrew Burgess <aburgess@redhat.com>
Thu, 18 Dec 2025 13:30:38 +0000 (13:30 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Thu, 18 Dec 2025 14:20:23 +0000 (14:20 +0000)
After commit:

  commit b5160e2ee6a0192389caf7acee1fc32961ed29f4 (upstream/master, upstream/HEAD, gdb-tmp-g)
  Date:   Fri Jul 26 16:32:33 2024 +0100

      gdb: improve line number lookup around inline functions

the following tclint errors were reported:

  gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:211:26: expression with substitutions should be enclosed by braces [unbraced-expr]
  gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp:212:26: expression with substitutions should be enclosed by braces [unbraced-expr]

Fixed by this commit.

gdb/testsuite/gdb.dwarf2/dw2-inline-bt.exp

index cf66897cd70afd38f5567128754fa17256a0e37a..77a18918eb1b92301fbf9a74ec9242b9639100b8 100644 (file)
@@ -208,8 +208,8 @@ proc do_test { } {
     # is reported.  We might get different line numbers depending on
     # how the architectures skip prologue function works.  This test
     # is all about how frame #1 is reported.
-    set foo_body_1 [expr $::foo_prologue + 1]
-    set foo_body_2 [expr $::foo_prologue + 2]
+    set foo_body_1 [expr {$::foo_prologue + 1}]
+    set foo_body_2 [expr {$::foo_prologue + 2}]
     gdb_test "bt" \
        [multi_line \
             "^#0\\s+foo \\(\\) at \[^\r\n\]+$::srcfile:(?:$::foo_prologue|$foo_body_1|$foo_body_2)" \