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

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed May 14 14:33:00 UTC 2025


Hi Jeevaka,
On 2025-05-07 at 16:01:43 +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>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.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
>  #define __maybe_unused __attribute__((unused))
>  
>  extern const char* __igt_test_description __attribute__((weak));
> -- 
> 2.34.1
> 


More information about the igt-dev mailing list