[linux-next:master 7931/8719] statmount_test_ns.c:27:17: warning: format not a string literal and no format arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   df9574a57d02b265322e77fb8628d4d33641dda9
commit: f0f1033dd078339a6588b571fe1243e2a2c5e519 [7931/8719] selftests: add a test for the foreign mnt ns extensions
:::::: branch date: 16 hours ago
:::::: commit date: 2 days ago
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240627/202406271913.5Vxny2Tc-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/r/202406271913.5Vxny2Tc-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   statmount_test_ns.c: In function 'handle_result':
>> statmount_test_ns.c:27:17: warning: format not a string literal and no format arguments [-Wformat-security]
      27 |                 ksft_test_result_pass(testname);
         |                 ^~~~~~~~~~~~~~~~~~~~~
   statmount_test_ns.c:29:17: warning: format not a string literal and no format arguments [-Wformat-security]
      29 |                 ksft_test_result_fail(testname);
         |                 ^~~~~~~~~~~~~~~~~~~~~
   statmount_test_ns.c:31:17: warning: format not a string literal and no format arguments [-Wformat-security]
      31 |                 ksft_exit_fail_msg(testname);
         |                 ^~~~~~~~~~~~~~~~~~
   statmount_test_ns.c:33:17: warning: format not a string literal and no format arguments [-Wformat-security]
      33 |                 ksft_test_result_skip(testname);
         |                 ^~~~~~~~~~~~~~~~~~~~~
   statmount_test_ns.c: In function 'test_listmount_ns':
>> statmount_test_ns.c:322:17: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
     322 |                 write(child_ready_pipe[1], &nr_mounts, sizeof(nr_mounts));
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> statmount_test_ns.c:323:17: warning: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
     323 |                 read(parent_ready_pipe[0], &cval, sizeof(cval));
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   statmount_test_ns.c:331:9: warning: ignoring return value of 'read' declared with attribute 'warn_unused_result' [-Wunused-result]
     331 |         read(child_ready_pipe[0], &nr_mounts, sizeof(nr_mounts));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   statmount_test_ns.c:335:9: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result]
     335 |         write(parent_ready_pipe[1], &pval, sizeof(pval));
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +27 tools/testing/selftests/filesystems/statmount/statmount_test_ns.c

f0f1033dd07833 Josef Bacik 2024-06-24  23  
f0f1033dd07833 Josef Bacik 2024-06-24  24  static void handle_result(int ret, const char *testname)
f0f1033dd07833 Josef Bacik 2024-06-24  25  {
f0f1033dd07833 Josef Bacik 2024-06-24  26  	if (ret == NSID_PASS)
f0f1033dd07833 Josef Bacik 2024-06-24 @27  		ksft_test_result_pass(testname);
f0f1033dd07833 Josef Bacik 2024-06-24  28  	else if (ret == NSID_FAIL)
f0f1033dd07833 Josef Bacik 2024-06-24  29  		ksft_test_result_fail(testname);
f0f1033dd07833 Josef Bacik 2024-06-24  30  	else if (ret == NSID_ERROR)
f0f1033dd07833 Josef Bacik 2024-06-24  31  		ksft_exit_fail_msg(testname);
f0f1033dd07833 Josef Bacik 2024-06-24  32  	else
f0f1033dd07833 Josef Bacik 2024-06-24  33  		ksft_test_result_skip(testname);
f0f1033dd07833 Josef Bacik 2024-06-24  34  }
f0f1033dd07833 Josef Bacik 2024-06-24  35  

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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux