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
|
@ -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…
Reference in New Issue