[PATCH] erofs-utils: lib: rename `fallthrough` to `erofs_fallthrough`

Gao Xiang hsiangkao at linux.alibaba.com
Wed Aug 27 16:13:48 AEST 2025


Hi Noboru,

On 2025/8/27 14:09, Noboru Asai wrote:
> In order to fix compile errors with libxxhash,
> since `fallthrough` is used in xxhash.h.
> 
> Signed-off-by: Noboru Asai <asai at sijam.com>
> ---
>   include/erofs/defs.h | 4 ++--
>   lib/namei.c          | 2 +-
>   lib/rebuild.c        | 2 +-
>   lib/zmap.c           | 2 +-
>   4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/include/erofs/defs.h b/include/erofs/defs.h
> index 0f3e754..b705149 100644
> --- a/include/erofs/defs.h
> +++ b/include/erofs/defs.h
> @@ -370,9 +370,9 @@ unsigned long __roundup_pow_of_two(unsigned long n)
>   #define __erofs_unlikely(x)    __builtin_expect(!!(x), 0)
>   
>   #if __has_attribute(__fallthrough__)
> -# define fallthrough	__attribute__((__fallthrough__))
> +# define erofs_fallthrough	__attribute__((__fallthrough__))
>   #else
> -# define fallthrough	do {} while (0)  /* fallthrough */
> +# define erofs_fallthrough	do {} while (0)  /* fallthrough */

Thanks for the patch!

How about using __erofs_fallthrough; for internal macros?

Thanks,
Gao Xiang



More information about the Linux-erofs mailing list