This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] btrace: fix test build error in gdb.btrace/instruction_history.c


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e26b7e41652e288dfdb4c48121bba470c4774150

commit e26b7e41652e288dfdb4c48121bba470c4774150
Author: Markus Metzger <markus.t.metzger@intel.com>
Date:   Wed Apr 13 14:06:51 2016 +0200

    btrace: fix test build error in gdb.btrace/instruction_history.c
    
    On systems with a newer version of GCC the gdb.btrace/instruction_history.exp
    test fails to build like this:
    
        Running .../gdb.btrace/instruction_history.exp ...
        gdb compile failed, .../gdb.btrace/instruction_history.c:
        In function 'main': .../gdb.btrace/instruction_history.c:24:3: warning:
        implicit declaration of function 'loop' [-Wimplicit-function-declaration]
           loop ();
           ^
    
    Declare loop to fix it.
    
    testsuite/
    	* gdb.btrace/instruction_history.c (loop): Add declaration.

Diff:
---
 gdb/testsuite/ChangeLog                        | 4 ++++
 gdb/testsuite/gdb.btrace/instruction_history.c | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d3d400b..e7a0f3f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-04-13  Markus Metzger  <markus.t.metzger@intel.com>
+
+	* gdb.btrace/instruction_history.c (loop): Add declaration.
+
 2016-04-12  Antoine Tremblay  <antoine.tremblay@ericsson.com>
 
 	* gdb.trace/ftrace.exp (proc): Change test prefix from "ond" to "cond".
diff --git a/gdb/testsuite/gdb.btrace/instruction_history.c b/gdb/testsuite/gdb.btrace/instruction_history.c
index bf8f60e..8178535 100644
--- a/gdb/testsuite/gdb.btrace/instruction_history.c
+++ b/gdb/testsuite/gdb.btrace/instruction_history.c
@@ -17,6 +17,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/>.  */
 
+extern void loop (void);
+
 int
 main (void)
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]