git: 1aef571102e2 - main - rb_tree: Use void casts for RB_AUGMENT_CHECK with unused return value.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 29 Sep 2022 22:07:42 UTC
The branch main has been updated by jhb:

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

commit 1aef571102e2d56b062916d69d962e8eeecfd1bf
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-09-29 22:05:22 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-09-29 22:05:22 +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
---
 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 460af08407b8..6743a8eb104c 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);							\
 }