All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [crng-random:vdso-droppable 9/10] vdso_test_getrandom.c:146:40: warning: omitting the parameter name in a function definition is a C23 extension
Date: Wed, 22 May 2024 22:13:09 +0800	[thread overview]
Message-ID: <202405222229.7dUI3Wc0-lkp@intel.com> (raw)

:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: zx2c4@kernel.org
TO: "Jason A. Donenfeld" <zx2c4@kernel.org>

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git vdso-droppable
head:   a7eca399da39972132d1fb50f4160b86b7498198
commit: 8cd2c9c9e4c91d99eeb68284c1f5d464a2925963 [9/10] random: introduce generic vDSO getrandom() implementation
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240522/202405222229.7dUI3Wc0-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/r/202405222229.7dUI3Wc0-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> vdso_test_getrandom.c:146:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     146 | static void *test_vdso_getrandom(void *)
         |                                        ^
   vdso_test_getrandom.c:156:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     156 | static void *test_libc_getrandom(void *)
         |                                        ^
   vdso_test_getrandom.c:166:43: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     166 | static void *test_syscall_getrandom(void *)
         |                                           ^
   3 warnings generated.
   parse_vdso.c:65:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
      65 |                 if (g = h & 0xf0000000)
         |                     ~~^~~~~~~~~~~~~~~~
   parse_vdso.c:65:9: note: place parentheses around the assignment to silence this warning
      65 |                 if (g = h & 0xf0000000)
         |                       ^               
         |                     (                 )
   parse_vdso.c:65:9: note: use '==' to turn this assignment into an equality comparison
      65 |                 if (g = h & 0xf0000000)
         |                       ^
         |                       ==
   parse_vdso.c:206:22: warning: passing 'const char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
     206 |         ver_hash = elf_hash(version);
         |                             ^~~~~~~
   parse_vdso.c:59:52: note: passing argument to parameter 'name' here
      59 | static unsigned long elf_hash(const unsigned char *name)
         |                                                    ^
   parse_vdso.c:207:46: warning: passing 'const char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
     207 |         ELF(Word) chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket];
         |                                                     ^~~~
   parse_vdso.c:59:52: note: passing argument to parameter 'name' here
      59 | static unsigned long elf_hash(const unsigned char *name)
         |                                                    ^
   3 warnings generated.


vim +146 tools/testing/selftests/vDSO/vdso_test_getrandom.c

8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  145  
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18 @146  static void *test_vdso_getrandom(void *)
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  147  {
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  148  	for (size_t i = 0; i < TRIALS; ++i) {
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  149  		unsigned int val;
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  150  		ssize_t ret = vgetrandom(&val, sizeof(val), 0);
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  151  		assert(ret == sizeof(val));
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  152  	}
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  153  	return NULL;
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  154  }
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  155  

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <yujie.liu@intel.com>
To: "Jason A. Donenfeld" <zx2c4@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>, <zx2c4@kernel.org>
Subject: [crng-random:vdso-droppable 9/10] vdso_test_getrandom.c:146:40: warning: omitting the parameter name in a function definition is a C23 extension
Date: Thu, 23 May 2024 09:40:01 +0800	[thread overview]
Message-ID: <202405222229.7dUI3Wc0-lkp@intel.com> (raw)

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git vdso-droppable
head:   a7eca399da39972132d1fb50f4160b86b7498198
commit: 8cd2c9c9e4c91d99eeb68284c1f5d464a2925963 [9/10] random: introduce generic vDSO getrandom() implementation
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)

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 <yujie.liu@intel.com>
| Closes: https://lore.kernel.org/r/202405222229.7dUI3Wc0-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> vdso_test_getrandom.c:146:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     146 | static void *test_vdso_getrandom(void *)
         |                                        ^
   vdso_test_getrandom.c:156:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     156 | static void *test_libc_getrandom(void *)
         |                                        ^
   vdso_test_getrandom.c:166:43: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
     166 | static void *test_syscall_getrandom(void *)
         |                                           ^
   3 warnings generated.
   parse_vdso.c:65:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
      65 |                 if (g = h & 0xf0000000)
         |                     ~~^~~~~~~~~~~~~~~~
   parse_vdso.c:65:9: note: place parentheses around the assignment to silence this warning
      65 |                 if (g = h & 0xf0000000)
         |                       ^               
         |                     (                 )
   parse_vdso.c:65:9: note: use '==' to turn this assignment into an equality comparison
      65 |                 if (g = h & 0xf0000000)
         |                       ^
         |                       ==
   parse_vdso.c:206:22: warning: passing 'const char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
     206 |         ver_hash = elf_hash(version);
         |                             ^~~~~~~
   parse_vdso.c:59:52: note: passing argument to parameter 'name' here
      59 | static unsigned long elf_hash(const unsigned char *name)
         |                                                    ^
   parse_vdso.c:207:46: warning: passing 'const char *' to parameter of type 'const unsigned char *' converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
     207 |         ELF(Word) chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket];
         |                                                     ^~~~
   parse_vdso.c:59:52: note: passing argument to parameter 'name' here
      59 | static unsigned long elf_hash(const unsigned char *name)
         |                                                    ^
   3 warnings generated.


vim +146 tools/testing/selftests/vDSO/vdso_test_getrandom.c

8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  145  
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18 @146  static void *test_vdso_getrandom(void *)
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  147  {
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  148  	for (size_t i = 0; i < TRIALS; ++i) {
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  149  		unsigned int val;
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  150  		ssize_t ret = vgetrandom(&val, sizeof(val), 0);
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  151  		assert(ret == sizeof(val));
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  152  	}
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  153  	return NULL;
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  154  }
8cd2c9c9e4c91d Jason A. Donenfeld 2022-11-18  155  

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


             reply	other threads:[~2024-05-22 14:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-22 14:13 kernel test robot [this message]
2024-05-23  1:40 ` [crng-random:vdso-droppable 9/10] vdso_test_getrandom.c:146:40: warning: omitting the parameter name in a function definition is a C23 extension kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202405222229.7dUI3Wc0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.