summaryrefslogtreecommitdiff
path: root/mysys/stacktrace.c
diff options
context:
space:
mode:
authorJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-08 10:48:31 +0100
committerJon Olav Hauglid <jon.hauglid@oracle.com>2010-11-08 10:48:31 +0100
commit55086d79e1864f8a9f66af808d4566665d7bc846 (patch)
tree41b1edc8ec8698619cbb96b01a61fe92bc7d61d4 /mysys/stacktrace.c
parent8f237f5874a814daaa7431748849997d1a2aa8ea (diff)
downloadmariadb-git-55086d79e1864f8a9f66af808d4566665d7bc846.tar.gz
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.
Diffstat (limited to 'mysys/stacktrace.c')
-rw-r--r--mysys/stacktrace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c
index 7bac8017324..ebd84548a9b 100644
--- a/mysys/stacktrace.c
+++ b/mysys/stacktrace.c
@@ -318,6 +318,9 @@ end:
/* Produce a core for the thread */
void my_write_core(int sig)
{
+#ifdef HAVE_gcov
+ extern void __gcov_flush(void);
+#endif
signal(sig, SIG_DFL);
#ifdef HAVE_gcov
/*
@@ -325,7 +328,6 @@ void my_write_core(int sig)
information from this process, causing gcov output to be incomplete.
So we force the writing of coverage information here before terminating.
*/
- extern void __gcov_flush(void);
__gcov_flush();
#endif
pthread_kill(pthread_self(), sig);