]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Stop using nowarnings in gdb/testsuite/gdb.multi/
authorPedro Alves <palves@redhat.com>
Thu, 10 Dec 2015 16:21:06 +0000 (16:21 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 10 Dec 2015 16:21:06 +0000 (16:21 +0000)
Several of the gdb.multi tests use the "nowarnings" option to suppress
warnings.  The warnings in question all come from missing headers,
like e.g.:

 src/gdb/testsuite/gdb.multi/multi-arch-exec.c:28:3: warning: incompatible implicit declaration of built-in function 'exit' [enabled by default]
    exit (1);
    ^

There's no point in trying to avoid to include standard headers.  In
gdb.base/hangout.c's case, it's even dangerous, as that file calls
printf.  In order to compile a call to a variatic function correctly,
a declaration must be visible.

gdb/testsuite/ChangeLog:
2015-12-10  Pedro Alves  <palves@redhat.com>

* gdb.multi/base.exp: Don't use nowarnings.
* gdb.multi/bkpt-multi-exec.exp: Don't use nowarnings.
* gdb.multi/hangout.c: Include stdio.h.
* gdb.multi/hello.c: Include stdlib.h.
* gdb.multi/multi-arch-exec.c: Include stdlib.h.
* gdb.multi/multi-arch-exec.exp: Don't use nowarnings.
* gdb.multi/multi-arch.exp: Don't use nowarnings.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.multi/base.exp
gdb/testsuite/gdb.multi/bkpt-multi-exec.exp
gdb/testsuite/gdb.multi/hangout.c
gdb/testsuite/gdb.multi/hello.c
gdb/testsuite/gdb.multi/multi-arch-exec.c
gdb/testsuite/gdb.multi/multi-arch-exec.exp
gdb/testsuite/gdb.multi/multi-arch.exp

index bad4382e8b72f6900b360457281d35bd10467e69..f0e026d0901947a572655c9260133b605830223b 100644 (file)
@@ -1,3 +1,13 @@
+2015-12-10  Pedro Alves  <palves@redhat.com>
+
+       * gdb.multi/base.exp: Don't use nowarnings.
+       * gdb.multi/bkpt-multi-exec.exp: Don't use nowarnings.
+       * gdb.multi/hangout.c: Include stdio.h.
+       * gdb.multi/hello.c: Include stdlib.h.
+       * gdb.multi/multi-arch-exec.c: Include stdlib.h.
+       * gdb.multi/multi-arch-exec.exp: Don't use nowarnings.
+       * gdb.multi/multi-arch.exp: Don't use nowarnings.
+
 2015-12-10  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * gdb.dwarf2/dw2-ranges-base.c: New file.
index 78b913ce5c0a3d3a63cf7c08c94a557b290962f8..b58e49a380d62c41447de78c83728fcc3aaa4bb4 100644 (file)
@@ -30,15 +30,15 @@ set exec3 "goodbye"
 set srcfile3 ${exec3}.c
 set binfile3 [standard_output_file ${exec3}]
 
-if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnings}] == -1 } {
+if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" {debug}] == -1 } {
     return -1
 }
 
-if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnings}] == -1} {
+if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" {debug}] == -1} {
     return -1
 }
 
-if { [build_executable ${testfile}.exp ${exec3} "${srcfile3}" {debug nowarnings}] == -1 } {
+if { [build_executable ${testfile}.exp ${exec3} "${srcfile3}" {debug}] == -1 } {
     return -1
 }
 
index 4f572bb0a768530fafb1d3000754b6672c860040..e66c1ba43c64a92283f11ebda508123fd5794ac0 100644 (file)
@@ -33,7 +33,7 @@ set exec2 "crashme"
 set srcfile2 ${exec2}.c
 set binfile2 [standard_output_file ${exec2}]
 
-set compile_options {debug nowarnings}
+set compile_options {debug}
 set dirname [relative_filename [pwd] [file dirname $binfile1]]
 lappend compile_options "additional_flags=-DBASEDIR=\"$dirname\""
 
index c67b6216c019a6c1462dee92e6473c7d1b423b03..0ac2650e81ab5e4369c6cad958252f7be5672b7b 100644 (file)
@@ -15,6 +15,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdio.h>
+
 main(int argc, char *argv[])
 {
   int i;
index 0233c961d242a8c0847ce948da29a398f69185b9..a7c11f77314a35ec7ef88b14eb2544c2d7c29469 100644 (file)
@@ -15,6 +15,8 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdlib.h>
+
 short hglob = 1;
 
 short glob = 92;
index 4c8dfaa28693e038ef5205dfa03d18adf6840869..918af4bb2ec4c2ed23776fbde3f6231cedd37949 100644 (file)
@@ -15,6 +15,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 
index 67020d92e12672c019598ea3c02f5b46e3a97636..a54f408ea0b69c6cff85b8fdbb74b651072dd662 100644 (file)
@@ -54,13 +54,13 @@ if [istarget "s390*-*-*"] {
 
 set dirname [relative_filename [pwd] [file dirname $binfile2]]
 if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \
-         [list debug nowarnings \
+         [list debug \
               additional_flags=${march1} \
               additional_flags=-DBASEDIR=\"$dirname\"]] } {
     return -1
 }
 
-set options [list debug nowarnings]
+set options [list debug]
 
 if { [istarget "aarch64*-*-*"] } {
     if {[info exists ARM_CC_FOR_TARGET]} {
index 70d0a0978b91db4f887e7e7e01f93e2d0d4ceb22..986e663f1c96d0d79ad34c16b799ab323fc3fb93 100644 (file)
@@ -53,11 +53,11 @@ if [istarget "s390*-*-*"] {
 }
 
 if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" \
-         [list debug nowarnings additional_flags=${march1}]] } {
+         [list debug additional_flags=${march1}]] } {
     return -1
 }
 
-set options [list debug nowarnings]
+set options [list debug]
 
 if [istarget "aarch64*-*-*"] {
     if {[info exists ARM_CC_FOR_TARGET]} {