summaryrefslogtreecommitdiff
path: root/sys/lib/libunwind
diff options
context:
space:
mode:
authorjoerg <joerg@NetBSD.org>2014-07-14 11:36:39 +0000
committerjoerg <joerg@NetBSD.org>2014-07-14 11:36:39 +0000
commit72d6a3dc802cec6bc95ef4e14cd9aeddeb50422b (patch)
treeecf78f8203a48fd1b9964ba75f10edb2d0f8949b /sys/lib/libunwind
parent5fddc42071c6263c20cb4a90399a255dbde7bb18 (diff)
Use static_cast for rb_tree_insert_node void * return value.
Diffstat (limited to 'sys/lib/libunwind')
-rw-r--r--sys/lib/libunwind/AddressSpace.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/lib/libunwind/AddressSpace.hpp b/sys/lib/libunwind/AddressSpace.hpp
index 20df04ada6d..6b2e941ce68 100644
--- a/sys/lib/libunwind/AddressSpace.hpp
+++ b/sys/lib/libunwind/AddressSpace.hpp
@@ -294,7 +294,7 @@ public:
n->last_pc = pcEnd;
n->data_base = 0;
n->ehframe_base = 0;
- if (rb_tree_insert_node(&segmentTree, n) == n) {
+ if (static_cast<Range *>(rb_tree_insert_node(&segmentTree, n)) == n) {
pthread_rwlock_unlock(&fdeTreeLock);
return true;
}
@@ -305,7 +305,7 @@ public:
bool removeFDE(pint_t pcStart, pint_t pcEnd, pint_t fde) {
pthread_rwlock_wrlock(&fdeTreeLock);
- Range *n = (Range *)rb_tree_find_node(&segmentTree, &pcStart);
+ Range *n = static_cast<Range *>(rb_tree_find_node(&segmentTree, &pcStart));
if (n == NULL) {
pthread_rwlock_unlock(&fdeTreeLock);
return false;
@@ -402,7 +402,7 @@ private:
n->data_base = data_base;
n->ehframe_base = ehframe_base;
- if (rb_tree_insert_node(&segmentTree, n) != n) {
+ if (static_cast<Range *>(rb_tree_insert_node(&segmentTree, n)) == n) {
free(n);
return;
}