git: 52d4f5b16a15 - stable/13 - rb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.

From: Doug Moore <dougm_at_FreeBSD.org>
Date: Wed, 12 Oct 2022 03:00:28 UTC
The branch stable/13 has been updated by dougm:

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

commit 52d4f5b16a150c7d6227f258ce1d70c44e6a6d72
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-09-29 22:05:22 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2022-10-12 02:47:45 +0000

    rb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.
    
    Reviewed by:    dougm
    Reported by:    GCC -Wunused-value
    Differential Revision:  https://reviews.freebsd.org/D36778
    
    (cherry picked from commit 1aef571102e2d56b062916d69d962e8eeecfd1bf)
---
 sys/sys/tree.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/sys/tree.h b/sys/sys/tree.h
index 10f559f516d2..47cd14d6691b 100644
--- a/sys/sys/tree.h
+++ b/sys/sys/tree.h
@@ -603,8 +603,8 @@ name##_RB_INSERT_COLOR(struct name *head,				\
 		 * so update augmentation for them.			\
 		 */							\
 		if (elm != child)					\
-			RB_AUGMENT_CHECK(elm);				\
-		RB_AUGMENT_CHECK(parent);				\
+			(void)RB_AUGMENT_CHECK(elm);			\
+		(void)RB_AUGMENT_CHECK(parent);				\
 		return (child);						\
 	} while ((parent = gpar) != NULL);				\
 	return (NULL);							\
@@ -734,7 +734,7 @@ name##_RB_REMOVE_COLOR(struct name *head,				\
 		 * augmentation for it.					\
 		 */							\
 		if (sib != elm)						\
-			RB_AUGMENT_CHECK(sib);				\
+			(void)RB_AUGMENT_CHECK(sib);			\
 		return (parent);					\
 	} while (elm = parent, (parent = gpar) != NULL);		\
 	return (NULL);							\
@@ -793,8 +793,8 @@ name##_RB_REMOVE(struct name *head, struct type *out)			\
 			 * changed subtrees, so update augmentation for	\
 			 * them if AUGMENT_WALK didn't.			\
 			 */						\
-			RB_AUGMENT_CHECK(opar);				\
-			RB_AUGMENT_CHECK(RB_PARENT(opar, field));	\
+			(void)RB_AUGMENT_CHECK(opar);			\
+			(void)RB_AUGMENT_CHECK(RB_PARENT(opar, field));	\
 		}							\
 	}								\
 	return (out);							\
@@ -830,7 +830,7 @@ name##_RB_INSERT(struct name *head, struct type *elm)			\
 		 * changed subtree, so update augmentation for it if	\
 		 * AUGMENT_WALK didn't.					\
 		 */							\
-		RB_AUGMENT_CHECK(tmp);					\
+		(void)RB_AUGMENT_CHECK(tmp);				\
 	return (NULL);							\
 }