From: Tom de Vries Date: Wed, 24 Jul 2019 17:01:59 +0000 (+0200) Subject: [gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b3b965fb91e1671da5b7d42349fa0d78e80c29f4;p=binutils-gdb.git [gdb/testsuite] Fix implicit declaration of printf in gdb.objc/*.m When running gdb.objc/objcdecode.exp we get: ... objcdecode.m: In function '-[Decode multipleDef]': objcdecode.m:14:3: warning: incompatible implicit declaration of built-in \ function 'printf' printf("method multipleDef\n"); ^~~~~~ objcdecode.m:14:3: note: include '' or provide a declaration of \ 'printf' ... Fix this in the three gdb.objc/*.m test-cases by including stdio.h. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-07-24 Tom de Vries PR testsuite/24807 * gdb.objc/basicclass.m: Include stdio.h. * gdb.objc/nondebug.m: Same. * gdb.objc/objcdecode.m: Same. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index dde5e9cb4df..62701ed7173 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-07-24 Tom de Vries + + PR testsuite/24807 + * gdb.objc/basicclass.m: Include stdio.h. + * gdb.objc/nondebug.m: Same. + * gdb.objc/objcdecode.m: Same. + 2019-07-24 Tom de Vries PR testsuite/24612 diff --git a/gdb/testsuite/gdb.objc/basicclass.m b/gdb/testsuite/gdb.objc/basicclass.m index 0de12db25a1..d9b3f23954c 100644 --- a/gdb/testsuite/gdb.objc/basicclass.m +++ b/gdb/testsuite/gdb.objc/basicclass.m @@ -1,3 +1,4 @@ +#include #include @interface BasicClass: Object diff --git a/gdb/testsuite/gdb.objc/nondebug.m b/gdb/testsuite/gdb.objc/nondebug.m index dcbdde936c7..352a71c30e3 100644 --- a/gdb/testsuite/gdb.objc/nondebug.m +++ b/gdb/testsuite/gdb.objc/nondebug.m @@ -1,3 +1,4 @@ +#include #include @interface NonDebug: Object diff --git a/gdb/testsuite/gdb.objc/objcdecode.m b/gdb/testsuite/gdb.objc/objcdecode.m index 5e99618d115..a061661ed93 100644 --- a/gdb/testsuite/gdb.objc/objcdecode.m +++ b/gdb/testsuite/gdb.objc/objcdecode.m @@ -1,3 +1,4 @@ +#include #include @interface Decode: Object