The following changes since commit c7f72c4bdb3586025cc7c5da707e69cc7a1baf07: Merge branch 'master' of https://github.com/safl/fio (2020-06-23 12:41:35 -0600) are available in the Git repository at: git://git.kernel.dk/fio.git master for you to fetch changes up to dc6143a58735b781820bb4e3094114078b055810: Merge branch 'compiler' of https://github.com/bvanassche/fio (2020-06-24 09:02:06 -0600) ---------------------------------------------------------------- Bart Van Assche (1): Merge compiler/gcc4.h into compiler/compiler.h Jens Axboe (1): Merge branch 'compiler' of https://github.com/bvanassche/fio compiler/compiler-gcc4.h | 17 ----------------- compiler/compiler.h | 8 ++++---- 2 files changed, 4 insertions(+), 21 deletions(-) delete mode 100644 compiler/compiler-gcc4.h --- Diff of recent changes: diff --git a/compiler/compiler-gcc4.h b/compiler/compiler-gcc4.h deleted file mode 100644 index e8701cf0..00000000 --- a/compiler/compiler-gcc4.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef FIO_COMPILER_GCC4_H -#define FIO_COMPILER_GCC4_H - -#ifndef __must_check -#define __must_check __attribute__((warn_unused_result)) -#endif - -#define GCC_VERSION (__GNUC__ * 10000 \ - + __GNUC_MINOR__ * 100 \ - + __GNUC_PATCHLEVEL__) - -#if GCC_VERSION >= 40300 -#define __compiletime_warning(message) __attribute__((warning(message))) -#define __compiletime_error(message) __attribute__((error(message))) -#endif - -#endif diff --git a/compiler/compiler.h b/compiler/compiler.h index 8eba2929..8c0eb9d1 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -3,15 +3,15 @@ /* IWYU pragma: begin_exports */ #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __clang_major__ >= 6 -#include "compiler-gcc4.h" #else #error Compiler too old, need at least gcc 4.9 #endif /* IWYU pragma: end_exports */ -#ifndef __must_check -#define __must_check -#endif +#define __must_check __attribute__((warn_unused_result)) + +#define __compiletime_warning(message) __attribute__((warning(message))) +#define __compiletime_error(message) __attribute__((error(message))) /* * Mark unused variables passed to ops functions as unused, to silence gcc