From d86d6eb281ba99fca1bb39ad3dc05c5681dded5d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 23 Jun 2016 21:07:36 +0100 Subject: Silence compiler warnings for expected and handled error conditions Silly compiler emitting warnings that just cause people to break code attempting to silence the compiler. Signed-off-by: Chris Wilson --- lib/igt_core.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/igt_core.h') diff --git a/lib/igt_core.h b/lib/igt_core.h index 59952331..64d823f6 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -296,6 +296,17 @@ void __igt_fail_assert(const char *domain, const char *file, __attribute__((noreturn)); void igt_exit(void) __attribute__((noreturn)); +/** + * igt_ignore_warn: + * @expr: condition to ignore + * + * + * Stops the compiler warning about an unused return value. + */ +static inline void igt_ignore_warn(bool value) +{ +} + /** * igt_assert: * @expr: condition to test -- cgit v1.2.3