[gdb/testsuite] Fix gdb_unbuffer_output return-type
authorTom de Vries <tdevries@suse.de>
Wed, 6 May 2020 07:41:26 +0000 (09:41 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 6 May 2020 07:41:26 +0000 (09:41 +0200)
When running test-case gdb.base/shlib-call.exp with clang, we get:
...
gdb compile failed, In file included from shmain.c:6:
unbuffer_output.c:39:1: warning:
      control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
...

Fix this by changing the return-type to void.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-05-06  Tom de Vries  <tdevries@suse.de>

* lib/unbuffer_output.c (gdb_unbuffer_output): Change return type to
void.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/unbuffer_output.c

index 4ffff5dcbe5d0617975b224b4c23fbb637bc3db3..d04ce49ade9329828aae1eaf5a779a70a0ebe8c6 100644 (file)
@@ -1,3 +1,8 @@
+2020-05-06  Tom de Vries  <tdevries@suse.de>
+
+       * lib/unbuffer_output.c (gdb_unbuffer_output): Change return type to
+       void.
+
 2020-05-06  Tom de Vries  <tdevries@suse.de>
 
        * lib/gdb.exp (is_stmt_addresses, hex_in_list): New proc, factored out
index d272f5e3a9ccde6a5555066db8e78c7876e57a0c..afb6f4188b4401892ec2091f72cb7f3c66cf7566 100644 (file)
@@ -22,7 +22,7 @@
 #include <unistd.h>
 #endif
 
-static int
+static void
 gdb_unbuffer_output (void)
 {
   /* Always force this for Windows testing.  To a native Windows