Re: [PATCH next] wifi: iwlwifi: Avoid disabling GCC specific flag with clang

From: Johannes Berg
Date: Thu Mar 16 2023 - 03:53:26 EST


On Wed, 2023-03-15 at 20:28 -0700, Nathan Chancellor wrote:
> Clang errors:
>
> drivers/net/wireless/intel/iwlwifi/iwl-devtrace.c:15:32: error: unknown warning group '-Wsuggest-attribute=format', ignored [-Werror,-Wunknown-warning-option]
> #pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
> ^
> 1 error generated.

Oops.

> The warning being disabled by this pragma is GCC specific. Guard its use
> with CONFIG_CC_IS_GCC so that it is not used with clang to clear up the
> error.
>

Thanks.

johannes