[PATCH v4 10/15] lib/igt_core: Conditionally define __noreturn for non-Android platforms

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed May 14 12:53:21 UTC 2025


On Wed, May 07, 2025 at 04:01:43PM +0000, Jeevaka Prabu Badrappan wrote:
> Ensure __noreturn is defined only if it is not already defined,
> addressing compatibility with Android where __noreturn is predefined.
> 
> Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan at intel.com>
> ---
>  lib/igt_core.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/igt_core.h b/lib/igt_core.h
> index 45170e215..2db579423 100644
> --- a/lib/igt_core.h
> +++ b/lib/igt_core.h
> @@ -86,7 +86,9 @@
>  #define igt_assume(e) BUILD_BUG_ON_INVALID(e)
>  #endif
>  
> +#ifndef __noreturn
>  #define __noreturn __attribute__((noreturn))
> +#endif

Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>

--
Zbigniew

>  #define __maybe_unused __attribute__((unused))
>  
>  extern const char* __igt_test_description __attribute__((weak));
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list