Quoting Tvrtko Ursulin (2017-11-03 11:47:54)
> From: Tvrtko Ursulin <[email protected]>
> 
> Add helpers for direct write to stderr to consolidate the code
> and avoid the unused result warning in build.
> 
> Signed-off-by: Tvrtko Ursulin <[email protected]>
> ---
>  lib/igt_core.c | 23 ++++++++++++++++-------
>  1 file changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 538a4472e209..351859eaa04c 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -1239,7 +1239,7 @@ static const char hex[] = "0123456789abcdef";
>  static void
>  xputch(int c)
>  {
> -       write(STDERR_FILENO, (const void *) &c, 1);
> +       igt_assert_eq(write(STDERR_FILENO, (const void *) &c, 1), 1);

Infinite recursion, you can't use an assert from inside the assert
handler.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to