mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 13:14:02 +02:00
The following works fine with gcc and clang, but sparse warns about
label_len not being an actual constant expression:
const size_t label_len = sizeof(label) - 1;
...
static_assert(label_len <= 255);
Avoid this by giving label an explicit length and using sizeof(label)
instead of label_len.
Reported-by: John Garry <john.g.garry@oracle.com>
Closes: https://lore.kernel.org/linux-nvme/965a37dd-f698-46b6-9623-1099a13f7e60@oracle.com
Fixes:
|
||
|---|---|---|
| .. | ||
| tests | ||
| .kunitconfig | ||
| auth.c | ||
| Kconfig | ||
| keyring.c | ||
| Makefile | ||