Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [zab-rpdfs:rpdfs-initial 89/93] fs/rpdfs/super.c:251:7: warning: variable 'ret' is used uninitialized whenever switch case is taken
@ 2026-08-02  1:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-02  1:47 UTC (permalink / raw)
  To: Zach Brown; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/zab/linux-rpdfs.git rpdfs-initial
head:   7dd9571ed4664ad741e8519b4a4369a2d84523f6
commit: 007d92272595c74bef214041918d3a13e9b1daf1 [89/93] rpdfs: remove block granular cache design
config: hexagon-randconfig-002-20260802 (https://download.01.org/0day-ci/archive/20260802/202608020944.Zq9yfxSf-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/20260802/202608020944.Zq9yfxSf-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/202608020944.Zq9yfxSf-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/rpdfs/super.c:251:7: warning: variable 'ret' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
     251 |         case Opt_mkfs:
         |              ^~~~~~~~
   fs/rpdfs/super.c:265:9: note: uninitialized use occurs here
     265 |         return ret;
         |                ^~~
   fs/rpdfs/super.c:241:9: note: initialize the variable 'ret' to silence this warning
     241 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.


vim +/ret +251 fs/rpdfs/super.c

3dd054768bf09ee Zach Brown 2026-03-10  234  
e8e76da7ed715ef Zach Brown 2025-08-13  235  static int rpdfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
e8e76da7ed715ef Zach Brown 2025-08-13  236  {
e8e76da7ed715ef Zach Brown 2025-08-13  237  	struct rpdfs_fs_context *rfc = fc->fs_private;
a46ee3744c08232 Zach Brown 2026-07-28  238  	struct rpdfs_params *params = &rfc->params;
e8e76da7ed715ef Zach Brown 2025-08-13  239  	struct fs_parse_result result;
e8e76da7ed715ef Zach Brown 2025-08-13  240  	int token;
e8e76da7ed715ef Zach Brown 2025-08-13  241  	int ret;
e8e76da7ed715ef Zach Brown 2025-08-13  242  
e8e76da7ed715ef Zach Brown 2025-08-13  243  	token = fs_parse(fc, rpdfs_mount_parameters, param, &result);
e8e76da7ed715ef Zach Brown 2025-08-13  244  	if (token < 0)
e8e76da7ed715ef Zach Brown 2025-08-13  245  		return token;
e8e76da7ed715ef Zach Brown 2025-08-13  246  
e8e76da7ed715ef Zach Brown 2025-08-13  247  	switch (token) {
3dd054768bf09ee Zach Brown 2026-03-10  248  	case Opt_devd_addr:
a46ee3744c08232 Zach Brown 2026-07-28  249  		ret = parse_devd_addr(fc, params, param->string);
3dd054768bf09ee Zach Brown 2026-03-10  250  		break;
e8e76da7ed715ef Zach Brown 2025-08-13 @251  	case Opt_mkfs:
a46ee3744c08232 Zach Brown 2026-07-28  252  		params->mkfs = true;
e8e76da7ed715ef Zach Brown 2025-08-13  253  		break;
e8e76da7ed715ef Zach Brown 2025-08-13  254  	case Opt_source:
a46ee3744c08232 Zach Brown 2026-07-28  255  		ret = parse_devd_addr(fc, params, param->string);
3dd054768bf09ee Zach Brown 2026-03-10  256  		if (ret == 0) {
e8e76da7ed715ef Zach Brown 2025-08-13  257  			fc->source = param->string;
e8e76da7ed715ef Zach Brown 2025-08-13  258  			param->string = NULL;
e8e76da7ed715ef Zach Brown 2025-08-13  259  		}
e8e76da7ed715ef Zach Brown 2025-08-13  260  		break;
e8e76da7ed715ef Zach Brown 2025-08-13  261  	default:
e8e76da7ed715ef Zach Brown 2025-08-13  262  		return invalfc(fc, "Unknown option token '%d'", token);
e8e76da7ed715ef Zach Brown 2025-08-13  263  	}
e8e76da7ed715ef Zach Brown 2025-08-13  264  
e8e76da7ed715ef Zach Brown 2025-08-13  265  	return ret;
e8e76da7ed715ef Zach Brown 2025-08-13  266  }
e8e76da7ed715ef Zach Brown 2025-08-13  267  

:::::: The code at line 251 was first introduced by commit
:::::: e8e76da7ed715ef67ccc4436f4981a5b39983d9f rpdfs: initial commit

:::::: TO: Zach Brown <zab@zabbo.net>
:::::: CC: Zach Brown <zab@zabbo.net>

--
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:[~2026-08-02  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-02  1:47 [zab-rpdfs:rpdfs-initial 89/93] fs/rpdfs/super.c:251:7: warning: variable 'ret' is used uninitialized whenever switch case is taken 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