From b32102f6586da0082663c61fed9af2c5aa8b5ba7 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Tue, 21 Apr 2020 16:56:09 +0100 Subject: [PATCH] Fix compilation errors with clang in gdb.base/advance.c Clang fails to compile the above file, with the following errors: warning: control reaches end of non-void function [-Wreturn-type] warning: too many arguments in call to 'func' This prevents the following testcases from executing: gdb.base/advance.exp gdb.base/until-nodebug.exp gdb/testsuite/ChangeLog: * gdb.base/advance.c (func): New argument, to match call site. (func2, func3): Add return statements. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/advance.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index affdb63cd76..10c2a01b4b9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-21 Gary Benson + + * gdb.base/advance.c (func): New argument, to match call site. + (func2, func3): Add return statements. + 2020-04-21 Tankut Baris Aktemur * gdb.multi/run-only-second-inf.c: New file. diff --git a/gdb/testsuite/gdb.base/advance.c b/gdb/testsuite/gdb.base/advance.c index ab86b0e5696..a72cb13be01 100644 --- a/gdb/testsuite/gdb.base/advance.c +++ b/gdb/testsuite/gdb.base/advance.c @@ -16,9 +16,10 @@ int bar (int y) int func2 () { x = 6; + return x; } -void func() +void func(int c) { x = x + 5; func2 (); @@ -27,6 +28,7 @@ void func() int func3 () { x = 4; + return x; } void marker1 () -- 2.30.2