Daniel P. Berrangé <[email protected]> writes:

> Functions annotated with 'warn_unused_result' cannot be cast
> to (void) to silence the compiler. Add the ignore_vaule()

ignore_value()

> macro which tricks the compiler into thinking the result is
> genuinely used, avoiding the need for manual workarounds where
> the return value is intentionally ignored.
>
> This clever macro is derived from one originating with the
> GNULIB project:
>
>   
> https://gitweb.git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/ignore-value.h;hb=HEAD
>
> but simplified since we don't need compat with old GCC and
> optimizing on clang is overkill.
>
> Reviewed-by: Marc-André Lureau <[email protected]>
> Signed-off-by: Daniel P. Berrangé <[email protected]>


Reply via email to