mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
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:
parent
a3eca706ce
commit
832f7f5ba5
1 changed files with 4 additions and 4 deletions
|
|
@ -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_; \
|
||||
})
|
||||
|
||||
/* ========================================================================== */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue