spa: a quick fix for compiling with -Werror=shadow

spa_exchange() is used in spa_clear_ptr() and spa_clear_fd() which
already use the _old_value variable. So make it use a slightly different
local variable name to avoid shadow warnings.

Fixes #3915
This commit is contained in:
Wim Taymans 2024-03-20 10:06:44 +01:00
parent a3eca706ce
commit 832f7f5ba5
1 changed files with 4 additions and 4 deletions

View File

@ -7,10 +7,10 @@
#define spa_exchange(var, new_value) \
__extension__ ({ \
__typeof__(var) *_ptr = &(var); \
__typeof__(var) _old_value = *_ptr; \
*_ptr = (new_value); \
_old_value; \
__typeof__(var) *_ptr_ = &(var); \
__typeof__(var) _old_value_ = *_ptr_; \
*_ptr_ = (new_value); \
_old_value_; \
})
/* ========================================================================== */