summaryrefslogtreecommitdiff
path: root/lib/igt_core.h
diff options
context:
space:
mode:
authorAshutosh Dixit <ashutosh.dixit@intel.com>2021-01-29 22:44:21 -0800
committerChris Wilson <chris@chris-wilson.co.uk>2021-01-30 14:39:00 +0000
commite02612921a4e95aef3a368e7468f4337c9dcee7d (patch)
tree7b8feaa11b5787c2b78c362222e0e99b30c865e4 /lib/igt_core.h
parentfdc23507d022b68443121ec2c1a951af27c87240 (diff)
meson: Turn on -Werror
We can choose which compile warnings to enable, but once they are enabled treat all warnings as error. This enforces stricter checks against compile warnings creeping in. v2: Fix redefinition warning errors from i915/gem_userptr_blits v3: Fix the even more pedantic clang compilation v4: Do not alter whitespace in lib/tests/igt_describe! Note: clang does not build assembler/ Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r--lib/igt_core.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 20667387..6075d153 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -79,6 +79,9 @@
#define igt_assume(e) BUILD_BUG_ON_INVALID(e)
#endif
+#define __noreturn __attribute__((noreturn))
+#define __maybe_unused __attribute__((unused))
+
extern const char* __igt_test_description __attribute__((weak));
extern bool __igt_plain_output;
extern char *igt_frame_dump_path;
@@ -133,7 +136,7 @@ struct _GKeyFile *igt_load_igtrc(void);
bool __igt_fixture(void);
void __igt_fixture_complete(void);
-void __igt_fixture_end(void) __attribute__((noreturn));
+__noreturn void __igt_fixture_end(void);
/**
* igt_fixture:
*
@@ -489,31 +492,29 @@ void igt_simple_init_parse_opts(int *argc, char **argv,
__attribute__((constructor)) \
static void igt_tokencat(__igt_constructor_l, __LINE__)(void)
-__attribute__((format(printf, 1, 2)))
-void igt_skip(const char *f, ...) __attribute__((noreturn));
-__attribute__((format(printf, 5, 6)))
+__noreturn __attribute__((format(printf, 1, 2)))
+void igt_skip(const char *f, ...);
+__noreturn __attribute__((format(printf, 5, 6)))
void __igt_skip_check(const char *file, const int line,
const char *func, const char *check,
- const char *format, ...) __attribute__((noreturn));
+ const char *format, ...);
#define igt_skip_check(E, F...) \
__igt_skip_check(__FILE__, __LINE__, __func__, E, F)
void igt_success(void);
bool igt_can_fail(void);
-void igt_fail(int exitcode) __attribute__((noreturn));
-__attribute__((format(printf, 6, 7)))
+__noreturn void igt_fail(int exitcode);
+__noreturn __attribute__((format(printf, 6, 7)))
void __igt_fail_assert(const char *domain, const char *file,
const int line, const char *func, const char *assertion,
- const char *format, ...)
- __attribute__((noreturn));
-__attribute__((format(printf, 6, 7)))
-void __igt_abort(const char *domain, const char *file, const int line,
- const char *func, const char *expression,
- const char *f, ...)
- __attribute__((noreturn));
-void igt_exit(void) __attribute__((noreturn));
-void igt_fatal_error(void) __attribute__((noreturn));
+ const char *format, ...);
+__noreturn __attribute__((format(printf, 6, 7)))
+void __igt_abort(const char *domain, const char *file,
+ const int line, const char *func, const char *expression,
+ const char *f, ...);
+__noreturn void igt_exit(void);
+__noreturn void igt_fatal_error(void);
/**
* igt_ignore_warn: