Module Name:    src
Committed By:   joerg
Date:           Mon Jul 14 11:36:39 UTC 2014

Modified Files:
        src/sys/lib/libunwind: AddressSpace.hpp

Log Message:
Use static_cast for rb_tree_insert_node void * return value.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/lib/libunwind/AddressSpace.hpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/lib/libunwind/AddressSpace.hpp
diff -u src/sys/lib/libunwind/AddressSpace.hpp:1.5 src/sys/lib/libunwind/AddressSpace.hpp:1.6
--- src/sys/lib/libunwind/AddressSpace.hpp:1.5	Mon Apr 28 13:39:23 2014
+++ src/sys/lib/libunwind/AddressSpace.hpp	Mon Jul 14 11:36:39 2014
@@ -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;
     }

Reply via email to