Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/common/include/linux Define __must_check to...
details: https://anonhg.NetBSD.org/src/rev/b6b452389f72
branches: trunk
changeset: 835398:b6b452389f72
user: riastradh <riastradh%NetBSD.org@localhost>
date: Mon Aug 27 14:48:07 2018 +0000
description:
Define __must_check to actually use warn_unused_result.
diffstat:
sys/external/bsd/common/include/linux/kernel.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r a418eeab0358 -r b6b452389f72 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h Mon Aug 27 14:47:53 2018 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h Mon Aug 27 14:48:07 2018 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index