Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libunwind Use static_cast for rb_tree_insert_node vo...



details:   https://anonhg.NetBSD.org/src/rev/e44004e12221
branches:  trunk
changeset: 330566:e44004e12221
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Jul 14 11:36:39 2014 +0000

description:
Use static_cast for rb_tree_insert_node void * return value.

diffstat:

 sys/lib/libunwind/AddressSpace.hpp |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 9face8b22737 -r e44004e12221 sys/lib/libunwind/AddressSpace.hpp
--- a/sys/lib/libunwind/AddressSpace.hpp        Mon Jul 14 10:36:33 2014 +0000
+++ b/sys/lib/libunwind/AddressSpace.hpp        Mon Jul 14 11:36:39 2014 +0000
@@ -294,7 +294,7 @@
     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 @@
 
   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 @@
     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;
     }



Home | Main Index | Thread Index | Old Index