From 4bf1b7195223ea68c7ed6a24f4f826be02d8bec0 Mon Sep 17 00:00:00 2001 From: Tommi Rantala Date: Tue, 31 Jul 2012 16:04:12 +0300 Subject: [PATCH] Use unw_context_t instead of ucontext_t in tests/Gtest-trace.c and tests/Gtest-bt.c At least on ARM unw_context_t and ucontext_t are not the same types, so use unw_context_t. See also commit 24112f6d9b87554fe18b1ca0f939f30c76ac38fa ("Fix some test failures on x86_64 on distros with small default stacks.") Gtest-trace.c: In function 'do_backtrace': Gtest-trace.c:66:3: warning: initialization from incompatible pointer type [enabled by default] Gtest-trace.c:67:3: warning: passing argument 2 of '_Uarm_init_local' from incompatible pointer type [enabled by default] ../include/libunwind-common.h:239:1: note: expected 'struct unw_context_t *' but argument is of type 'struct ucontext_t *' Gtest-bt.c: In function 'do_backtrace': Gtest-bt.c:65:3: warning: initialization from incompatible pointer type [enabled by default] Gtest-bt.c:66:3: warning: passing argument 2 of '_Uarm_init_local' from incompatible pointer type [enabled by default] ../include/libunwind-common.h:239:1: note: expected 'struct unw_context_t *' but argument is of type 'struct ucontext_t *' --- tests/Gtest-bt.c | 2 +- tests/Gtest-trace.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Gtest-bt.c b/tests/Gtest-bt.c index fb5b3966..b5f4439a 100644 --- a/tests/Gtest-bt.c +++ b/tests/Gtest-bt.c @@ -50,7 +50,7 @@ int num_errors; * cause the signal stack to overflow */ char buf[512], name[256]; unw_cursor_t cursor; -ucontext_t uc; +unw_context_t uc; static void do_backtrace (void) diff --git a/tests/Gtest-trace.c b/tests/Gtest-trace.c index ed34e58d..7488ee6e 100644 --- a/tests/Gtest-trace.c +++ b/tests/Gtest-trace.c @@ -50,7 +50,7 @@ int num_errors; char buf[512], name[256]; void *addresses[3][128]; unw_cursor_t cursor; -ucontext_t uc; +unw_context_t uc; static void do_backtrace (void)