summaryrefslogtreecommitdiffstats
path: root/libcxxabi
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2014-12-21 14:22:00 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2014-12-21 14:22:00 +0000
commitf52cf3318abb1227d3f27e1f5439ff50c986b7be (patch)
treed9e95d076a108bb7b3561a92975013d1ee56bbfa /libcxxabi
parent5c45c541a20b0f82fb9e2c065db500b7d4412fc3 (diff)
downloadbcm5719-llvm-f52cf3318abb1227d3f27e1f5439ff50c986b7be.tar.gz
bcm5719-llvm-f52cf3318abb1227d3f27e1f5439ff50c986b7be.zip
Silence warnings in libunwind.
* Remove the embedded directive undefined behavior by moving the the #ifdef out of the macro arguments. [-Wembedded-directive] * Remove the local variable shadowing warning by renaming frameInfo in UnwindLevel1-gcc-ext.c. [-Wshadow] * Explicitly cast the function pointer to void pointer to avoid the comparison between function pointer and void pointer. [-Wpedantic] llvm-svn: 224690
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/src/Unwind/Unwind-EHABI.cpp2
-rw-r--r--libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c13
2 files changed, 9 insertions, 6 deletions
diff --git a/libcxxabi/src/Unwind/Unwind-EHABI.cpp b/libcxxabi/src/Unwind/Unwind-EHABI.cpp
index a1a1922c23f..55bef5a9c1a 100644
--- a/libcxxabi/src/Unwind/Unwind-EHABI.cpp
+++ b/libcxxabi/src/Unwind/Unwind-EHABI.cpp
@@ -249,7 +249,7 @@ decode_eht_entry(const uint32_t* data, size_t* off, size_t* len) {
_Unwind_Exception* unwind_exception,
_Unwind_Context* context);
void *PR = (void*)signExtendPrel31(*data);
- if (PR == &__gxx_personality_v0) {
+ if (PR == (void*)&__gxx_personality_v0) {
*off = 1; // First byte is size data.
*len = (((data[1] >> 24) & 0xff) + 1) * 4;
} else
diff --git a/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c b/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
index 9a02052166b..7b25ccff05b 100644
--- a/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
+++ b/libcxxabi/src/Unwind/UnwindLevel1-gcc-ext.c
@@ -25,12 +25,15 @@
/// Called by __cxa_rethrow().
_LIBUNWIND_EXPORT _Unwind_Reason_Code
_Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) {
+#if LIBCXXABI_ARM_EHABI
_LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), "
"private_1=%ld\n",
exception_object,
-#if LIBCXXABI_ARM_EHABI
(long)exception_object->unwinder_cache.reserved1);
#else
+ _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), "
+ "private_1=%ld\n",
+ exception_object,
(long)exception_object->private_1);
#endif
@@ -145,14 +148,14 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) {
// debugging
if (_LIBUNWIND_TRACING_UNWINDING) {
char functionName[512];
- unw_proc_info_t frameInfo;
+ unw_proc_info_t frame;
unw_word_t offset;
unw_get_proc_name(&cursor, functionName, 512, &offset);
- unw_get_proc_info(&cursor, &frameInfo);
+ unw_get_proc_info(&cursor, &frame);
_LIBUNWIND_TRACE_UNWINDING(
" _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p\n",
- (long long)frameInfo.start_ip, functionName, (long long)frameInfo.lsda,
- &cursor);
+ (long long)frame.start_ip, functionName,
+ (long long)frame.lsda, &cursor);
}
// call trace function with this frame
OpenPOWER on IntegriCloud