diff options
author | Peng Jiang <jiang.peng9@zte.com.cn> | 2025-03-24 19:12:30 +0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2025-04-10 11:07:10 +0200 |
commit | acea9943271b62905033f2f8ca571cdd52d6ea7b (patch) | |
tree | da0ee158354bdf495f9e6b35f9c5b13d86b63cab /rust/helpers/workqueue.c | |
parent | 92e250c624ea37fde64bfd624fd2556f0d846f18 (diff) | |
download | linux-acea9943271b62905033f2f8ca571cdd52d6ea7b.tar.gz linux-acea9943271b62905033f2f8ca571cdd52d6ea7b.tar.bz2 linux-acea9943271b62905033f2f8ca571cdd52d6ea7b.zip |
vdso: Address variable shadowing in macros
Compiling the kernel with gcc12.3 W=2 results in shadowing warnings:
warning: declaration of '__pptr' shadows a previous local [-Wshadow]
const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr);
note: in definition of macro '__put_unaligned_t'
__pptr->x = (val);
note: in expansion of macro '__get_unaligned_t'
__put_unaligned_t(type, __get_unaligned_t(type, src), dst);
__get_unaligned_t() and __put_unaligned_t() use a local variable named
'__pptr', which can lead to variable shadowing when these macros are used in
the same scope. This results in a -Wshadow warning during compilation.
To address this issue, rename the local variables within the macros to
ensure uniqueness.
Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250324191230477zpGtgIRSH4mEHdtxGtgx9@zte.com.cn
Diffstat (limited to 'rust/helpers/workqueue.c')
0 files changed, 0 insertions, 0 deletions