diff options
| author | riastradh <riastradh@NetBSD.org> | 2018-08-27 14:48:07 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2018-08-27 14:48:07 +0000 |
| commit | 17a7943ea09fda07a3aff5bb1c69643ce7384dec (patch) | |
| tree | 307401515df51615035dec1a262d5847bac036c1 | |
| parent | a9a34f4503e249560c898024d4790019454f1724 (diff) | |
Define __must_check to actually use warn_unused_result.
| -rw-r--r-- | sys/external/bsd/common/include/linux/kernel.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/external/bsd/common/include/linux/kernel.h b/sys/external/bsd/common/include/linux/kernel.h index 7127e9e1ee7..cb53794e025 100644 --- a/sys/external/bsd/common/include/linux/kernel.h +++ b/sys/external/bsd/common/include/linux/kernel.h @@ -1,4 +1,4 @@ -/* $NetBSD: kernel.h,v 1.20 2018/08/27 13:37:55 riastradh Exp $ */ +/* $NetBSD: kernel.h,v 1.21 2018/08/27 14:48:07 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -53,7 +53,11 @@ #define __printf __printflike #define __user -#define __must_check /* __attribute__((warn_unused_result)), if GCC */ +#if __GNUC_PREREQ__(4,0) /* not sure when but this will work */ +#define __must_check __attribute__((warn_unused_result)) +#else +#define __must_check /* nothing */ +#endif #define __always_unused __unused #define noinline __noinline |
