sparse: document that -Wbitwise is default
PATCH 1/1 sparse: document that -Wbitwise is default
In commit commit 02a886bfa3d9 ("Introduce keyword driven attribute parsing", 2007-03-08) the -Wbitwise keyword was broken and did not actually work. Instead, bitwise checks were always enabled.
This was fixed by commit commit 0dfda0d1f0fe ("make -Wbitwise operational again", 2017-02-18) which allowed -Wbitwise and -Wno-bitwise to work as expected.
However, since -Wbitwise was enabled for so long, that commit changed the default of -Wbitwise to be enabled, rather than the documented "disabled".
Fix the documentation to match, and explain that -Wbitwise is enabled by default and must be disabled.
--- sparse.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sparse.1 +2 -2
@@ -67,8 +67,8 @@ kind of like "NULL" for pointers). So "gfp_t" or the "safe endianness" types would be __bitwise: you can only operate on them by doing specific operations that know about *that* particular type. -Generally, you want bitwise if you are looking for type safety. Sparse -does not issue these warnings by default. +Sparse issues these warnings by default. To turn them off, use +\fB\-Wno\-bitwise\fR. . .TP .B \-Wcast\-to\-as
Signature · 1 line
2.14.1.436.g33e61a4f0239
Quoted 2 lines · Jacob Keller
Fix the documentation to match, and explain that -Wbitwise is enabled by default and must be disabled.
Thanks for noticing this (and for the patch, of course).
Christopher Li
maintainerQuoted 8 lines · Jacob Keller
In commit commit
02a886bfa3d9("Introduce keyword driven attribute parsing", 2007-03-08) the -Wbitwise keyword was broken and did not actually work. Instead, bitwise checks were always enabled.This was fixed by commit commit
0dfda0d1f0fe("make -Wbitwise operational again", 2017-02-18) which allowed -Wbitwise and -Wno-bitwise to work as expected.
Quoted 6 lines
However, since -Wbitwise was enabled for so long, that commit changed the default of -Wbitwise to be enabled, rather than the documented "disabled".
Fix the documentation to match, and explain that -Wbitwise is enabled by default and must be disabled.
Thanks. Will apply.
Chris