[PATCH v3] overflow: Introduce overflows_type() and castable_to_type()
Jani Nikula
jani.nikula at linux.intel.com
Thu Oct 13 08:12:29 UTC 2022
On Thu, 13 Oct 2022, Gwan-gyeong Mun <gwan-gyeong.mun at intel.com> wrote:
> diff --git a/lib/overflow_kunit.c b/lib/overflow_kunit.c
> index 0d98c9bc75da..44da9d190057 100644
> --- a/lib/overflow_kunit.c
> +++ b/lib/overflow_kunit.c
> @@ -16,6 +16,11 @@
> #include <linux/types.h>
> #include <linux/vmalloc.h>
>
> +/* We're expecting to do a lot of "always true" or "always false" tests. */
> +#ifdef CONFIG_CC_IS_CLANG
> +#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
> +#endif
I thought #pragma was discouraged. I didn't try this, but would
something like this work in the Makefile instead:
CFLAGS_overflow_kunit.o = $(call cc-disable-warning, tautological-constant-out-of-range-compare)
Sorry for not noticing before. If you all think pragma is fine, sorry
for the noise.
BR,
Jani.
--
Jani Nikula, Intel Open Source Graphics Center
More information about the dri-devel
mailing list