git: cde1c83e025a - stable/13 - rb_tree: silence unused function warnings

From: Doug Moore <dougm_at_FreeBSD.org>
Date: Sat, 01 Oct 2022 17:54:02 UTC
The branch stable/13 has been updated by dougm:

URL: https://cgit.FreeBSD.org/src/commit/?id=cde1c83e025aeaaf9fcc4e24410175421445baf9

commit cde1c83e025aeaaf9fcc4e24410175421445baf9
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2022-09-18 08:34:47 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2022-10-01 17:51:40 +0000

    rb_tree: silence unused function warnings
    
    With DIAGNOSTIC set a kernel build generates warnings about the
    defined-but-unused RB_RANK method. Don't set _RB_DIAGNOSTIC
    automatically, to silence these warnings.
    
    Reported by:    mjguzik@gmail.com
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D36617
    
    (cherry picked from commit 14696d81f163dacfcdaf42171556ebfd15416fb9)
---
 sys/sys/tree.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sys/sys/tree.h b/sys/sys/tree.h
index 414a89e202a0..face3386087f 100644
--- a/sys/sys/tree.h
+++ b/sys/sys/tree.h
@@ -410,10 +410,6 @@ struct {								\
 	RB_SET_PARENT(elm, tmp, field);					\
 } while (/*CONSTCOND*/ 0)
 
-#if defined(_KERNEL) && defined(DIAGNOSTIC) && !defined(_RB_DIAGNOSTIC)
-#define _RB_DIAGNOSTIC 1
-#endif
-
 /* Generates prototypes and inline functions */
 #define	RB_PROTOTYPE(name, type, field, cmp)				\
 	RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)