On Tue, Aug 12, 2025 at 11:02:11AM -0700, Nathan Chancellor wrote:
> Clang warns (or errors with CONFIG_WERROR=y):
>
> fs/bcachefs/sb-counters_format.h:132:2: error: label at end of compound
> statement is a C23 extension [-Werror,-Wc23-extensions]
> 132 | }
> | ^
>
> In older versions of clang, this is an unconditional hard error:
>
> fs/bcachefs/sb-counters_format.h:130:34: error: label at end of compound
> statement: expected statement
> BCH_PERSISTENT_COUNTERS()
> ^
> ;
>
> Add an empty statement to resolve the error/warning.
>
> Fixes: 38de86383436 ("bcachefs: Switch statement evaluate ids and confirm
> they are unique going forward")
> Signed-off-by: Nathan Chancellor <[email protected]>
Thanks, applied.
> ---
> fs/bcachefs/sb-counters_format.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/bcachefs/sb-counters_format.h
> b/fs/bcachefs/sb-counters_format.h
> index bfeb713dd210..96ad64920810 100644
> --- a/fs/bcachefs/sb-counters_format.h
> +++ b/fs/bcachefs/sb-counters_format.h
> @@ -129,6 +129,7 @@ static inline void __maybe_unused
> check_bch_counter_ids_unique(void) {
> #define x(t, n, ...) case (n):
> BCH_PERSISTENT_COUNTERS()
> #undef x
> + ;
> }
> }
>
>
> ---
> base-commit: 65c604dba89a86d3dae0bd98b7b0b6c077ac930c
> change-id:
> 20250812-bcachefs-fix-switch-check_bch_counter_ids_unique-2888b136b877
>
> Best regards,
> --
> Nathan Chancellor <[email protected]>
>