Caveh Jalali has uploaded this change for review. ( https://review.coreboot.org/20881
Change subject: add __must_check to */compiler.h ......................................................................
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 --- M payloads/libpayload/include/compiler.h M src/include/compiler.h M util/cbfstool/compiler.h M util/cbmem/compiler.h 4 files changed, 4 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/20881/1
diff --git a/payloads/libpayload/include/compiler.h b/payloads/libpayload/include/compiler.h index f218725..a830239 100644 --- a/payloads/libpayload/include/compiler.h +++ b/payloads/libpayload/include/compiler.h @@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __always_unused __attribute__((unused)) +#define __must_check __attribute__((warn_unused_result))
#endif diff --git a/src/include/compiler.h b/src/include/compiler.h index f218725..a830239 100644 --- a/src/include/compiler.h +++ b/src/include/compiler.h @@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __always_unused __attribute__((unused)) +#define __must_check __attribute__((warn_unused_result))
#endif diff --git a/util/cbfstool/compiler.h b/util/cbfstool/compiler.h index f218725..a830239 100644 --- a/util/cbfstool/compiler.h +++ b/util/cbfstool/compiler.h @@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __always_unused __attribute__((unused)) +#define __must_check __attribute__((warn_unused_result))
#endif diff --git a/util/cbmem/compiler.h b/util/cbmem/compiler.h index f218725..a830239 100644 --- a/util/cbmem/compiler.h +++ b/util/cbmem/compiler.h @@ -24,5 +24,6 @@
#define __aligned(x) __attribute__((aligned(x))) #define __always_unused __attribute__((unused)) +#define __must_check __attribute__((warn_unused_result))
#endif