summaryrefslogtreecommitdiffstats
path: root/share/man/man3
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2019-05-10 13:13:14 +0000
committerflorian <florian@openbsd.org>2019-05-10 13:13:14 +0000
commitc21bbb213c24a522038402545f9cf7fcd1d9a36e (patch)
treefdf8a3ebd4fd44b8138e9b9c2281d0b77906d9db /share/man/man3
parentFix prototype of upgrade(). OK benno@ (diff)
downloadwireguard-openbsd-c21bbb213c24a522038402545f9cf7fcd1d9a36e.tar.xz
wireguard-openbsd-c21bbb213c24a522038402545f9cf7fcd1d9a36e.zip
Make the red-black tree example -Wmissing-prototypes clean by providing
prototypes with RB_PROTOTYPE.
Diffstat (limited to 'share/man/man3')
-rw-r--r--share/man/man3/tree.38
1 files changed, 6 insertions, 2 deletions
diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3
index 3042ce573e4..eccc0202094 100644
--- a/share/man/man3/tree.3
+++ b/share/man/man3/tree.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tree.3,v 1.29 2017/07/24 17:06:03 jca Exp $
+.\" $OpenBSD: tree.3,v 1.30 2019/05/10 13:13:14 florian Exp $
.\"/*
.\" * Copyright 2002 Niels Provos <provos@citi.umich.edu>
.\" * All rights reserved.
@@ -23,7 +23,7 @@
.\" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\" */
-.Dd $Mdocdate: July 24 2017 $
+.Dd $Mdocdate: May 10 2019 $
.Dt SPLAY_INIT 3
.Os
.Sh NAME
@@ -492,6 +492,9 @@ struct node {
int i;
};
+int intcmp(struct node *, struct node *);
+void print_tree(struct node *);
+
int
intcmp(struct node *e1, struct node *e2)
{
@@ -499,6 +502,7 @@ intcmp(struct node *e1, struct node *e2)
}
RB_HEAD(inttree, node) head = RB_INITIALIZER(&head);
+RB_PROTOTYPE(inttree, node, entry, intcmp)
RB_GENERATE(inttree, node, entry, intcmp)
int testdata[] = {