summaryrefslogtreecommitdiff
path: root/tests/backtrace-dwarf.c
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2015-03-13 23:51:40 +0100
committerMark Wielaard <mjw@redhat.com>2015-03-13 23:52:09 +0100
commit0a35e3ac65dfd2db4e0ae0f68fdb21493c5fbfa1 (patch)
treedb2cd93cc8aabee663cf32bae2fc267c10dd35db /tests/backtrace-dwarf.c
parentbe7ea70f3fc2be7a39dc210a70e92109b5d9ef5d (diff)
downloadelfutils-0a35e3ac65dfd2db4e0ae0f68fdb21493c5fbfa1.tar.gz
Fix -Wimplicit warnings.
Diffstat (limited to 'tests/backtrace-dwarf.c')
-rw-r--r--tests/backtrace-dwarf.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index 87d088aa..fbcb22e6 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -1,5 +1,5 @@
/* Test program for unwinding of complicated DWARF expressions.
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -22,7 +22,11 @@
#include <stdio_ext.h>
#include <locale.h>
#include <errno.h>
+#include <error.h>
+#include <unistd.h>
#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include ELFUTILS_HEADER(dwfl)
#ifndef __linux__
@@ -37,7 +41,6 @@ main (int argc __attribute__ ((unused)), char **argv)
#else /* __linux__ */
-static void cleanup_13_abort (void);
#define main cleanup_13_main
#include "cleanup-13.c"
#undef main
@@ -115,7 +118,9 @@ static int
thread_callback (Dwfl_Thread *thread, void *thread_arg)
{
dwfl_thread_getframes (thread, frame_callback, NULL);
+ /* frame_callback shall exit (0) on success. */
error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1));
+ return DWARF_CB_ABORT;
}
int