diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-03-08 20:16:45 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-03-08 20:16:45 +0000 |
commit | 85bc82e6d9dd6447c2eb8414cd3ce650cfa0091a (patch) | |
tree | 3f47a7f8bb92c2b1001a8509a1b4042a01f77e7e | |
parent | f2ebd5904c06ebca3c759d0b8ca877ffaee62daf (diff) | |
download | libcxxabi-85bc82e6d9dd6447c2eb8414cd3ce650cfa0091a.tar.gz |
Enable/silence -Wconversion.
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@152328 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-x | lib/buildit | 2 | ||||
-rw-r--r-- | src/cxa_demangle.cpp | 6 | ||||
-rw-r--r-- | src/cxa_personality.cpp | 4 | ||||
-rw-r--r-- | src/fallback_malloc.ipp | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/buildit b/lib/buildit index 8ebae2d..f84c14c 100755 --- a/lib/buildit +++ b/lib/buildit @@ -28,7 +28,7 @@ then fi EXTRA_FLAGS="-std=c++0x -stdlib=libc++ -fstrict-aliasing -Wstrict-aliasing=2 \ - -Wsign-conversion -Wshadow -Wnewline-eof" + -Wsign-conversion -Wshadow -Wconversion -Wnewline-eof" case $TRIPLE in *-apple-*) diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp index ec71d7b..7cfd1a8 100644 --- a/src/cxa_demangle.cpp +++ b/src/cxa_demangle.cpp @@ -460,7 +460,7 @@ class __source_name : public __node { public: - __source_name(const char* __name, unsigned __size) + __source_name(const char* __name, size_t __size) { __name_ = __name; __size_ = __size; @@ -5962,7 +5962,7 @@ class __dot_suffix : public __node { public: - __dot_suffix(__node* name, const char* suffix, unsigned sz) + __dot_suffix(__node* name, const char* suffix, size_t sz) { __left_ = name; __name_ = suffix; @@ -10259,7 +10259,7 @@ __demangle_tree::__parse_nested_name(const char* first, const char* last) } break; case 'U': - assert(!"__parse_nested_name U"); + // assert(!"__parse_nested_name U"); // could have following <template-args> break; case 'T': diff --git a/src/cxa_personality.cpp b/src/cxa_personality.cpp index 874a069..0dccb11 100644 --- a/src/cxa_personality.cpp +++ b/src/cxa_personality.cpp @@ -247,7 +247,7 @@ readEncodedPointer(const uint8_t** data, uint8_t encoding) p += sizeof(uint32_t); break; case DW_EH_PE_udata8: - result = *((uint64_t*)p); + result = static_cast<uintptr_t>(*((uint64_t*)p)); p += sizeof(uint64_t); break; case DW_EH_PE_sdata2: @@ -527,7 +527,7 @@ scan_eh_tab(scan_results& results, _Unwind_Action actions, bool native_exception // Walk call-site table looking for range that // includes current PC. uint8_t callSiteEncoding = *lsda++; - uint32_t callSiteTableLength = readULEB128(&lsda); + uint32_t callSiteTableLength = static_cast<uint32_t>(readULEB128(&lsda)); const uint8_t* callSiteTableStart = lsda; const uint8_t* callSiteTableEnd = callSiteTableStart + callSiteTableLength; const uint8_t* actionTableStart = callSiteTableEnd; diff --git a/src/fallback_malloc.ipp b/src/fallback_malloc.ipp index ec75e88..e04fb15 100644 --- a/src/fallback_malloc.ipp +++ b/src/fallback_malloc.ipp @@ -54,7 +54,7 @@ heap_node *node_from_offset ( const heap_offset offset ) { return (heap_node *) ( heap + ( offset * sizeof (heap_node))); } heap_offset offset_from_node ( const heap_node *ptr ) - { return static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node); } + { return static_cast<heap_offset>(static_cast<size_t>(((char *) ptr ) - heap) / sizeof (heap_node)); } void init_heap () { freelist = (heap_node *) heap; @@ -87,7 +87,7 @@ void *fallback_malloc(size_t len) { p->len -= nelems; q = p + p->len; q->next_node = 0; - q->len = nelems; + q->len = static_cast<heap_size>(nelems); return (void *) (q + 1); } |