diff options
| author | Miguel Ojeda <[email protected]> | 2021-10-14 13:23:31 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2021-10-21 23:16:58 +0000 |
| commit | 7c00621dcaeea206d7489b3e8b50b1864841ae69 (patch) | |
| tree | 2f3b4b8cc9390b74f0130fee1366bdf4a0211147 /fs/btrfs/dev-replace.c | |
| parent | Compiler Attributes: remove GCC 5.1 mention (diff) | |
| download | kernel-7c00621dcaeea206d7489b3e8b50b1864841ae69.tar.gz kernel-7c00621dcaeea206d7489b3e8b50b1864841ae69.zip | |
compiler_types: mark __compiletime_assert failure as __noreturn
`__compiletime_assert` declares a fake `extern` function
which appears (to the compiler) to be called when the test fails.
Therefore, compilers may emit possibly-uninitialized warnings
in some cases, even if it will be an error anyway (for compilers
supporting the `error` attribute, e.g. GCC and Clang >= 14)
or a link failure (for those that do not, e.g. Clang < 14).
Annotating the fake function as `__noreturn` gives them
the information they need to avoid the warning,
e.g. see https://godbolt.org/z/x1v69jjYY.
Link: https://lore.kernel.org/llvm/[email protected]/
Reported-by: kernel test robot <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nick Desaulniers <[email protected]>
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions
