diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2019-05-10 13:13:15 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2019-05-10 13:13:15 +0000 |
commit | f3e577069aa9579c1d45f7d22a0ef9b1165eb5c7 (patch) | |
tree | e1637bb71074661d76533fd00f73a9cffbe55b90 | |
parent | 315c726602d839597bc37800e2a1465e6bf2ebee (diff) |
Make the red-black tree example -Wmissing-prototypes clean by providing
prototypes with RB_PROTOTYPE.
-rw-r--r-- | share/man/man3/tree.3 | 8 |
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[] = { |