Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/asm Use an intermedia...
details: https://anonhg.NetBSD.org/src/rev/62a2dabcb9be
branches: riastradh-drm2
changeset: 788360:62a2dabcb9be
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:25:28 2013 +0000
description:
Use an intermediate call in WARN* to avoid GCC compiler warnings.
For some reason this shuts it up about statements without effect.
diffstat:
sys/external/bsd/drm2/include/asm/bug.h | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 04237a9a9e02 -r 62a2dabcb9be sys/external/bsd/drm2/include/asm/bug.h
--- a/sys/external/bsd/drm2/include/asm/bug.h Wed Jul 24 03:25:10 2013 +0000
+++ b/sys/external/bsd/drm2/include/asm/bug.h Wed Jul 24 03:25:28 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bug.h,v 1.1.2.5 2013/07/24 03:02:51 riastradh Exp $ */
+/* $NetBSD: bug.h,v 1.1.2.6 2013/07/24 03:25:28 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
/* XXX Rate limit? */
#define WARN(CONDITION, FMT, ...) \
- ((CONDITION)? \
+ linux_warning((CONDITION)? \
(printf("warning: %s:%d: " FMT, __FILE__, __LINE__, \
##__VA_ARGS__), 1) \
: 0)
@@ -49,4 +49,11 @@
#define WARN_ON_SMP(CONDITION) WARN_ON(CONDITION) /* XXX */
#define WARN_ON_ONCE(CONDITION) WARN_ON(CONDITION) /* XXX */
+/* XXX Kludge to avoid GCC warning about statements without effect. */
+static inline int
+linux_warning(int x)
+{
+ return x;
+}
+
#endif /* _ASM_BUG_H_ */
Home |
Main Index |
Thread Index |
Old Index