The branch main has been updated by dougm:

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

commit b3fd5464a903180994313bd903f3c170f5f9e1f3
Author:     Doug Moore <do...@freebsd.org>
AuthorDate: 2022-08-02 16:47:17 +0000
Commit:     Doug Moore <do...@freebsd.org>
CommitDate: 2022-08-02 16:47:17 +0000

    rb_tree: resolve name clash
    
    Rename 'tmp' to 'rb_update_tmp' in a macro to avoid a shadow variable panic.
    
    Reported by:    i...@protected-networks.net
    Fixes:  35557a0d9169
---
 sys/sys/tree.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/sys/tree.h b/sys/sys/tree.h
index c0d21b5f8b73..45791e08c947 100644
--- a/sys/sys/tree.h
+++ b/sys/sys/tree.h
@@ -372,10 +372,10 @@ struct {                                                  
        \
 #endif
 
 #define RB_UPDATE_AUGMENT(elm, field) do {                             \
-       __typeof(elm) tmp = (elm);                                      \
+               __typeof(elm) rb_update_tmp = (elm);                    \
        do {                                                            \
-               RB_AUGMENT(tmp);                                        \
-       } while ((tmp = RB_PARENT(tmp, field)) != NULL);                \
+               RB_AUGMENT(rb_update_tmp);                              \
+       } while ((rb_update_tmp = RB_PARENT(rb_update_tmp, field)) != NULL); \
 } while (0)
 
 #define RB_SWAP_CHILD(head, out, in, field) do {                       \

Reply via email to