On Monday, 26 July 2021 14:57:31 CEST Arnd Bergmann wrote:
The special attribute force must be used in such statements when the cast is known to be safe to avoid these warnings.
I can see why this would warn, but I'm having trouble reproducing the warning on linux-next.
I have sparse 0.6.3 on an Debian bullseye amd64 system. Sources are from linux-next next-20210723
make allnoconfig cat >> .config << "EOF" CONFIG_NET=y CONFIG_INET=y CONFIG_BATMAN_ADV=y CONFIG_BATMAN_ADV_DAT=y EOF make olddefconfig make CHECK="sparse -Wbitwise-pointer" C=1
I should maybe have made this clearer in the last sentence of the first paragraph: "This is also true for pointers to variables with this type when -Wbitwise-pointer is activated."
Kind regards, Sven