add __must_check to */compiler.h

the __must_check function attribute is pretty much straight from the
linux kernel - used to encourage callers to consume function return
values.

Change-Id: I1812d957b745d6bebe2a8d34a9c4862316aa8530
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://review.coreboot.org/20881
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Caveh Jalali 2017-08-03 15:49:09 -07:00 committed by Martin Roth
parent 93cdc8bbc2
commit 0068a9f579
4 changed files with 4 additions and 0 deletions

View File

@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __aligned(x) __attribute__((aligned(x)))
#define __always_unused __attribute__((unused)) #define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result))
#endif #endif

View File

@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __aligned(x) __attribute__((aligned(x)))
#define __always_unused __attribute__((unused)) #define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result))
#endif #endif

View File

@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __aligned(x) __attribute__((aligned(x)))
#define __always_unused __attribute__((unused)) #define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result))
#endif #endif

View File

@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __aligned(x) __attribute__((aligned(x)))
#define __always_unused __attribute__((unused)) #define __always_unused __attribute__((unused))
#define __must_check __attribute__((warn_unused_result))
#endif #endif