Source-Changes-HG archive

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

[src/trunk]: src/sys/sys rbtree(3): No (rb_tree_t) for constant initializer.



details:   https://anonhg.NetBSD.org/src/rev/7ff4d00bbfcd
branches:  trunk
changeset: 378130:7ff4d00bbfcd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Jul 21 11:26:23 2023 +0000

description:
rbtree(3): No (rb_tree_t) for constant initializer.

This is a compound literal, which is not formally valid as a constant
initializer.

XXX pullup-10

diffstat:

 sys/sys/rbtree.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 847cd736cc45 -r 7ff4d00bbfcd sys/sys/rbtree.h
--- a/sys/sys/rbtree.h  Fri Jul 21 11:21:55 2023 +0000
+++ b/sys/sys/rbtree.h  Fri Jul 21 11:26:23 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rbtree.h,v 1.7 2023/07/18 11:46:47 riastradh Exp $     */
+/*     $NetBSD: rbtree.h,v 1.8 2023/07/21 11:26:23 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -189,7 +189,7 @@ typedef struct rb_tree {
 #define        RB_TREE_INIT_TYPECHECK(t)                                             \
        0*sizeof(&(t) - (struct rb_tree *)0)
 
-#define        RB_TREE_INITIALIZER(t, ops) (rb_tree_t)                               \
+#define        RB_TREE_INITIALIZER(t, ops)                                           \
 {                                                                            \
        .rbt_ops = (ops) + RB_TREE_INIT_TYPECHECK(t),                         \
        RBDEBUG_TREE_INITIALIZER(t)                                           \



Home | Main Index | Thread Index | Old Index