Source-Changes-HG archive

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

[src/trunk]: src/common/lib/libc/gen Fix warnings for -DRBSMALL



details:   https://anonhg.NetBSD.org/src/rev/a3be72f0b1b9
branches:  trunk
changeset: 754351:a3be72f0b1b9
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Apr 28 17:23:33 2010 +0000

description:
Fix warnings for -DRBSMALL

diffstat:

 common/lib/libc/gen/rb.c |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (29 lines):

diff -r 4ba360d7f887 -r a3be72f0b1b9 common/lib/libc/gen/rb.c
--- a/common/lib/libc/gen/rb.c  Wed Apr 28 16:34:25 2010 +0000
+++ b/common/lib/libc/gen/rb.c  Wed Apr 28 17:23:33 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rb.c,v 1.4 2009/05/19 22:48:19 yamt Exp $ */
+/* $NetBSD: rb.c,v 1.5 2010/04/28 17:23:33 joerg Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -472,7 +472,9 @@
 {
        const unsigned int which = RB_POSITION(self);
        struct rb_node *father = RB_FATHER(self);
+#ifndef RBSMALL
        const bool was_root = RB_ROOT_P(rbt, self);
+#endif
 
        KASSERT(rebalance || (RB_ROOT_P(rbt, self) || RB_RED_P(self)));
        KASSERT(!rebalance || RB_BLACK_P(self));
@@ -676,7 +678,9 @@
 {
        struct rb_node *father = RB_FATHER(self);
        struct rb_node *son = self->rb_nodes[which];
+#ifndef RBSMALL
        const bool was_root = RB_ROOT_P(rbt, self);
+#endif
 
        KASSERT(which == RB_DIR_LEFT || which == RB_DIR_RIGHT);
        KASSERT(RB_BLACK_P(self) && RB_RED_P(son));



Home | Main Index | Thread Index | Old Index