Module Name: src
Committed By: riastradh
Date: Mon Aug 27 14:48:07 UTC 2018
Modified Files:
src/sys/external/bsd/common/include/linux: kernel.h
Log Message:
Define __must_check to actually use warn_unused_result.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/common/include/linux/kernel.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/common/include/linux/kernel.h
diff -u src/sys/external/bsd/common/include/linux/kernel.h:1.20 src/sys/external/bsd/common/include/linux/kernel.h:1.21
--- src/sys/external/bsd/common/include/linux/kernel.h:1.20 Mon Aug 27 13:37:55 2018
+++ src/sys/external/bsd/common/include/linux/kernel.h Mon Aug 27 14:48:07 2018
@@ -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