Commit 15d7d7b6 authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

Bug #45288 pb2 returns a lot of compilation warnings

GCOV builds were broken after the patch for Bug#57933
which added add -Wdeclaration-after-statement to gcc builds.

This patch fixes:
stacktrace.c:328: warning: ISO C90 forbids mixed
declarations and code

No test case added.
parent 2340c15f
...@@ -318,6 +318,9 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack) ...@@ -318,6 +318,9 @@ void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack)
/* Produce a core for the thread */ /* Produce a core for the thread */
void my_write_core(int sig) void my_write_core(int sig)
{ {
#ifdef HAVE_gcov
extern void __gcov_flush(void);
#endif
signal(sig, SIG_DFL); signal(sig, SIG_DFL);
#ifdef HAVE_gcov #ifdef HAVE_gcov
/* /*
...@@ -325,7 +328,6 @@ void my_write_core(int sig) ...@@ -325,7 +328,6 @@ void my_write_core(int sig)
information from this process, causing gcov output to be incomplete. information from this process, causing gcov output to be incomplete.
So we force the writing of coverage information here before terminating. So we force the writing of coverage information here before terminating.
*/ */
extern void __gcov_flush(void);
__gcov_flush(); __gcov_flush();
#endif #endif
pthread_kill(pthread_self(), sig); pthread_kill(pthread_self(), sig);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment