fs/nfsd/nfs3xdr_gen.c:194:2: warning: switch condition has boolean value
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsv3-xdrgen head: 6158ace3b663c4e9ab201f2cc644f4290fa30905 commit: 2b5b97ec0f7a484e81bedf71e223f38b0feb98ca [41/55] Documentation: Add the RPC language description of NFSv3 config: arm-footbridge_defconfig (https://download.01.org/0day-ci/archive/20251117/[email protected]/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> fs/nfsd/nfs3xdr_gen.c:194:2: warning: switch condition has boolean value [-Wswitch-bool]
194 | switch (ptr->attributes_follow) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:220:2: warning: switch condition has boolean value [-Wswitch-bool]
220 | switch (ptr->attributes_follow) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:244:2: warning: switch condition has boolean value [-Wswitch-bool]
244 | switch (ptr->handle_follows) {
| ^ ~~~~~~~~~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:269:2: warning: switch condition has boolean value [-Wswitch-bool]
269 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:285:2: warning: switch condition has boolean value [-Wswitch-bool]
285 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:301:2: warning: switch condition has boolean value [-Wswitch-bool]
301 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:317:2: warning: switch condition has boolean value [-Wswitch-bool]
317 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:425:2: warning: switch condition has boolean value [-Wswitch-bool]
425 | switch (ptr->check) {
| ^ ~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2080:2: warning: switch condition has boolean value [-Wswitch-bool]
2080 | switch (ptr->attributes_follow) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2106:2: warning: switch condition has boolean value [-Wswitch-bool]
2106 | switch (ptr->attributes_follow) {
| ^ ~~~~~~~~~~~~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2130:2: warning: switch condition has boolean value [-Wswitch-bool]
2130 | switch (ptr->handle_follows) {
| ^ ~~~~~~~~~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2150:2: warning: switch condition has boolean value [-Wswitch-bool]
2150 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2166:2: warning: switch condition has boolean value [-Wswitch-bool]
2166 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2182:2: warning: switch condition has boolean value [-Wswitch-bool]
2182 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2198:2: warning: switch condition has boolean value [-Wswitch-bool]
2198 | switch (ptr->set_it) {
| ^ ~~~~~~~~~~~
fs/nfsd/nfs3xdr_gen.c:2306:2: warning: switch condition has boolean value [-Wswitch-bool]
2306 | switch (ptr->check) {
| ^ ~~~~~~~~~~16 warnings generated.
vim +194 fs/nfsd/nfs3xdr_gen.c
188
189 static bool __maybe_unused
190 xdrgen_decode_post_op_attr(struct xdr_stream *xdr, struct post_op_attr *ptr)
191 {
192 if (!xdrgen_decode_bool(xdr, &ptr->attributes_follow))
193 return false;
> 194 switch (ptr->attributes_follow) { 195 case TRUE:
196 if (!xdrgen_decode_fattr3(xdr, &ptr->u.attributes))
197 return false;
198 break;
199 }
200 return true;
201 }
202
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki