diff options
author | Tom Tromey <tom@tromey.com> | 2023-11-15 12:42:52 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-11-16 16:32:02 -0700 |
commit | a721a9b12f7fb1331ba2868129bc52d07a0e558a (patch) | |
tree | 535511cc67bee10b05239de88c87224fba57342e /gdb | |
parent | 7db795bc67abfc8ea3a34057f434960ee0b3cf41 (diff) | |
download | gdb-a721a9b12f7fb1331ba2868129bc52d07a0e558a.zip gdb-a721a9b12f7fb1331ba2868129bc52d07a0e558a.tar.gz gdb-a721a9b12f7fb1331ba2868129bc52d07a0e558a.tar.bz2 |
Fix small bug in compile.exp
compile.exp generally does not work for me on Fedora 38. However, I
sent a GCC patch to fix the plugin crash. With that patch, I get this
error from one test in compile.exp:
gdb command line:1:22: warning: initialization of 'int (*)(int)' from incompatible pointer type 'int (*)()' [-Wincompatible-pointer-types]
This patch adds a cast to compile.exp. This makes the test pass.
Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index f2ab4fa..86521e9 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -307,7 +307,7 @@ gdb_test "compile code globalvar = func_nodebug (75);" \ "call func_nodebug" gdb_test "p globalvar" " = -75" "expect -75" gdb_test \ - "compile code int (*funcp) (int) = func_nodebug; globalvar = funcp (76);" \ + "compile code int (*funcp) (int) = (int (*) (int)) func_nodebug; globalvar = funcp (76);" \ "warning: function has unknown return type; assuming int" \ "call func_nodebug indirectly" gdb_test "p globalvar" " = -76" "expect -76" |