llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [cel:nfsv3-xdrgen 41/55] fs/nfsd/nfs3xdr_gen.c:194:2: warning: switch condition has boolean value
@ 2025-11-17 15:52 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-17 15:52 UTC (permalink / raw)
  To: Chuck Lever; +Cc: llvm, oe-kbuild-all

tree:   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/202511172336.Y75zj4v6-lkp@intel.com/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/202511172336.Y75zj4v6-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511172336.Y75zj4v6-lkp@intel.com/

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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-17 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17 15:52 [cel:nfsv3-xdrgen 41/55] fs/nfsd/nfs3xdr_gen.c:194:2: warning: switch condition has boolean value kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).