This commit is contained in:
christos 2006-10-15 19:08:48 +00:00
parent 56ec5c798d
commit dc579d1dcf
5 changed files with 15 additions and 23 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop_bool.c,v 1.7 2006/10/12 04:41:13 thorpej Exp $ */
/* $NetBSD: prop_bool.c,v 1.8 2006/10/15 19:08:48 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -67,14 +67,14 @@ static const struct _prop_object_type _prop_object_type_bool = {
((x) != NULL && (x)->pb_obj.po_type == &_prop_object_type_bool)
static void
_prop_bool_free(void *v)
/*ARGSUSED*/
_prop_bool_free(void *v __unused)
{
/*
* This should never happen as we "leak" our initial reference
* count.
*/
(void) v;
/* XXX forced assertion failure? */
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop_number.c,v 1.9 2006/10/12 18:52:55 thorpej Exp $ */
/* $NetBSD: prop_number.c,v 1.10 2006/10/15 19:08:48 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -483,6 +483,7 @@ _prop_number_internalize_unsigned(struct _prop_object_internalize_context *ctx,
{
char *cp;
/*###486 [lint] warning expression has null effect [129]%%%*/
_PROP_ASSERT(/*CONSTCOND*/sizeof(unsigned long long) ==
sizeof(uint64_t));
@ -506,6 +507,7 @@ _prop_number_internalize_signed(struct _prop_object_internalize_context *ctx,
{
char *cp;
/*###509 [lint] warning expression has null effect [129]%%%*/
_PROP_ASSERT(/*CONSTCOND*/sizeof(long long) == sizeof(int64_t));
#ifndef _KERNEL

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop_object.c,v 1.7 2006/10/12 04:41:51 thorpej Exp $ */
/* $NetBSD: prop_object.c,v 1.8 2006/10/15 19:08:48 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -96,10 +96,9 @@ _prop_object_init(struct _prop_object *po, const struct _prop_object_type *pot)
*/
/*ARGSUSED*/
void
_prop_object_fini(struct _prop_object *po)
_prop_object_fini(struct _prop_object *po __unused)
{
/* Nothing to do, currently. */
(void) po;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop_object_impl.h,v 1.7 2006/10/04 09:43:45 dbj Exp $ */
/* $NetBSD: prop_object_impl.h,v 1.8 2006/10/15 19:08:48 christos Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@ -281,7 +281,7 @@ void * _prop_standalone_realloc(void *, size_t);
#include <stdlib.h>
#include <stddef.h>
#define _PROP_ASSERT(x) assert(x)
#define _PROP_ASSERT(x) /*LINTED*/assert(x)
#define _PROP_MALLOC(s, t) malloc((s))
#define _PROP_CALLOC(s, t) calloc(1, (s))

View File

@ -1,4 +1,4 @@
/* $NetBSD: prop_rb.c,v 1.4 2006/10/15 19:04:28 martin Exp $ */
/* $NetBSD: prop_rb.c,v 1.5 2006/10/15 19:08:48 christos Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -87,17 +87,12 @@ static bool rb_tree_check_node(const struct rb_tree *, const struct rb_node *,
* it to be const, that on some architectures trying to write to it will
* cause a fault.
*/
#ifdef __lint__
/* XXX Work around for bug in lint. */
static const struct rb_node sentinel_node = { 0 };
#else
static const struct rb_node sentinel_node = {
.rb_nodes = { RBUNCONST(&sentinel_node),
RBUNCONST(&sentinel_node),
NULL },
.rb_u.u_s = { .s_sentinel = 1, }
.rb_u = { .u_s = { .s_sentinel = 1 } },
};
#endif /* __lint__ */
void
_prop_rb_tree_init(struct rb_tree *rbt, const struct rb_tree_ops *ops)
@ -116,7 +111,7 @@ _prop_rb_tree_init(struct rb_tree *rbt, const struct rb_tree_ops *ops)
*/
/*ARGSUSED*/
static void
rb_tree_reparent_nodes(struct rb_tree *rbt, struct rb_node *old_father,
rb_tree_reparent_nodes(struct rb_tree *rbt __unused, struct rb_node *old_father,
unsigned int which)
{
const unsigned int other = which ^ RB_NODE_OTHER;
@ -126,8 +121,6 @@ rb_tree_reparent_nodes(struct rb_tree *rbt, struct rb_node *old_father,
struct rb_node * const new_child = old_father;
unsigned int properties;
(void) rbt;
KASSERT(which == RB_NODE_LEFT || which == RB_NODE_RIGHT);
KASSERT(!RB_SENTINEL_P(old_child));
@ -542,14 +535,12 @@ rb_tree_swap_prune_and_rebalance(struct rb_tree *rbt, struct rb_node *self,
*/
/*ARGSUSED*/
static void
rb_tree_prune_blackred_branch(struct rb_tree *rbt, struct rb_node *self,
unsigned int which)
rb_tree_prune_blackred_branch(struct rb_tree *rbt __unused,
struct rb_node *self, unsigned int which)
{
struct rb_node *parent = self->rb_parent;
struct rb_node *child = self->rb_nodes[which];
(void) rbt;
KASSERT(which == RB_NODE_LEFT || which == RB_NODE_RIGHT);
KASSERT(RB_BLACK_P(self) && RB_RED_P(child));
KASSERT(!RB_TWOCHILDREN_P(child));