Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Eric Biggers <ebiggers@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [ebiggers:wip-iscsi 1/1] drivers/target/iscsi/iscsi_target_auth.c:112:3: warning: label followed by a declaration is a C23 extension
Date: Tue, 05 May 2026 15:58:10 +0800	[thread overview]
Message-ID: <202605051559.ZeZtd8t6-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git wip-iscsi
head:   d75081a34e037b17f0f59228963a1cbd46afd4bd
commit: d75081a34e037b17f0f59228963a1cbd46afd4bd [1/1] scsi: target: iscsi: Use crypto library API
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260505/202605051559.ZeZtd8t6-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260505/202605051559.ZeZtd8t6-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/202605051559.ZeZtd8t6-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/target/iscsi/iscsi_target_auth.c:112:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     112 |                 static_assert(CHAP_MAX_DIGEST_SIZE >= MD5_DIGEST_SIZE);
         |                 ^
   include/linux/build_bug.h:79:34: note: expanded from macro 'static_assert'
      79 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^
   include/linux/build_bug.h:80:41: note: expanded from macro '__static_assert'
      80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^
   drivers/target/iscsi/iscsi_target_auth.c:116:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     116 |                 static_assert(CHAP_MAX_DIGEST_SIZE >= SHA1_DIGEST_SIZE);
         |                 ^
   include/linux/build_bug.h:79:34: note: expanded from macro 'static_assert'
      79 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^
   include/linux/build_bug.h:80:41: note: expanded from macro '__static_assert'
      80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^
   drivers/target/iscsi/iscsi_target_auth.c:120:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     120 |                 static_assert(CHAP_MAX_DIGEST_SIZE >= SHA256_DIGEST_SIZE);
         |                 ^
   include/linux/build_bug.h:79:34: note: expanded from macro 'static_assert'
      79 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^
   include/linux/build_bug.h:80:41: note: expanded from macro '__static_assert'
      80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^
   drivers/target/iscsi/iscsi_target_auth.c:124:3: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
     124 |                 static_assert(CHAP_MAX_DIGEST_SIZE >= SHA3_256_DIGEST_SIZE);
         |                 ^
   include/linux/build_bug.h:79:34: note: expanded from macro 'static_assert'
      79 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
         |                                  ^
   include/linux/build_bug.h:80:41: note: expanded from macro '__static_assert'
      80 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
         |                                         ^
   4 warnings generated.


vim +112 drivers/target/iscsi/iscsi_target_auth.c

   107	
   108	static void chap_digest_final(struct chap_digest_ctx *ctx, u8 *out)
   109	{
   110		switch (ctx->digest_type) {
   111		case CHAP_DIGEST_MD5:
 > 112			static_assert(CHAP_MAX_DIGEST_SIZE >= MD5_DIGEST_SIZE);
   113			md5_final(&ctx->md5, out);
   114			break;
   115		case CHAP_DIGEST_SHA1:
   116			static_assert(CHAP_MAX_DIGEST_SIZE >= SHA1_DIGEST_SIZE);
   117			sha1_final(&ctx->sha1, out);
   118			break;
   119		case CHAP_DIGEST_SHA256:
   120			static_assert(CHAP_MAX_DIGEST_SIZE >= SHA256_DIGEST_SIZE);
   121			sha256_final(&ctx->sha256, out);
   122			break;
   123		case CHAP_DIGEST_SHA3_256:
   124			static_assert(CHAP_MAX_DIGEST_SIZE >= SHA3_256_DIGEST_SIZE);
   125			sha3_final(&ctx->sha3, out);
   126			break;
   127		default:
   128			WARN_ON_ONCE(1);
   129		}
   130	}
   131	

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

                 reply	other threads:[~2026-05-05  7:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202605051559.ZeZtd8t6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ebiggers@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox