From: Saleem Abdulrasool Date: Wed, 11 Feb 2015 05:20:42 +0000 (+0000) Subject: unwind: silence -Wconversion warnings X-Git-Tag: llvmorg-3.7.0-rc1~12476 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5c3e56b38320e492064f7e6663168948e0e4856;p=platform%2Fupstream%2Fllvm.git unwind: silence -Wconversion warnings Clean up implicit uint8_t to uint32_t conversion warnings identified by GCC. llvm-svn: 228805 --- diff --git a/libcxxabi/src/Unwind/Unwind-EHABI.cpp b/libcxxabi/src/Unwind/Unwind-EHABI.cpp index e2fced2..5830758 100644 --- a/libcxxabi/src/Unwind/Unwind-EHABI.cpp +++ b/libcxxabi/src/Unwind/Unwind-EHABI.cpp @@ -324,7 +324,8 @@ _Unwind_Reason_Code _Unwind_VRS_Interpret( case 0xb3: { uint8_t v = getByte(data, offset++); _Unwind_VRS_Pop(context, _UVRSC_VFP, - RegisterRange(v >> 4, v & 0x0f), _UVRSD_VFPX); + RegisterRange(static_cast(v >> 4), + v & 0x0f), _UVRSD_VFPX); break; } case 0xb4: @@ -352,7 +353,7 @@ _Unwind_Reason_Code _Unwind_VRS_Interpret( break; case 0xc6: { uint8_t v = getByte(data, offset++); - uint8_t start = v >> 4; + uint8_t start = static_cast(v >> 4); uint8_t count_minus_one = v & 0xf; if (start + count_minus_one >= 16) return _URC_FAILURE; @@ -371,7 +372,8 @@ _Unwind_Reason_Code _Unwind_VRS_Interpret( case 0xc8: case 0xc9: { uint8_t v = getByte(data, offset++); - uint8_t start = ((byte == 0xc8) ? 16 : 0) + (v >> 4); + uint8_t start = + static_cast(((byte == 0xc8) ? 16 : 0) + (v >> 4)); uint8_t count_minus_one = v & 0xf; if (start + count_minus_one >= 32) return _URC_FAILURE; @@ -904,7 +906,7 @@ _Unwind_VRS_Result _Unwind_VRS_Pop( return _UVRSR_FAILED; } for (uint32_t i = 0; i < 16; ++i) { - if (!(discriminator & (1 << i))) + if (!(discriminator & static_cast(1 << i))) continue; uint32_t value = *sp++; if (regclass == _UVRSC_CORE && i == 13) diff --git a/libcxxabi/src/Unwind/UnwindCursor.hpp b/libcxxabi/src/Unwind/UnwindCursor.hpp index 10c866a..6817485 100644 --- a/libcxxabi/src/Unwind/UnwindCursor.hpp +++ b/libcxxabi/src/Unwind/UnwindCursor.hpp @@ -736,8 +736,8 @@ bool UnwindCursor::getInfoFromEHABISection( // in compact form (section 6.3 EHABI). if (exceptionTableData & 0x80000000) { // Grab the index of the personality routine from the compact form. - int choice = (exceptionTableData & 0x0f000000) >> 24; - int extraWords = 0; + uint32_t choice = (exceptionTableData & 0x0f000000) >> 24; + uint32_t extraWords = 0; switch (choice) { case 0: personalityRoutine = (unw_word_t) &__aeabi_unwind_cpp_pr0;