svn commit: r278222 - head/sys/sys
Dimitry Andric
dim at FreeBSD.org
Wed Feb 4 20:55:22 UTC 2015
Author: dim
Date: Wed Feb 4 20:55:21 2015
New Revision: 278222
URL: https://svnweb.freebsd.org/changeset/base/278222
Log:
Mark typedefs for manually implementing _Static_assert() as unused, so
they won't show up unecessarily for -Wunused-local-typedefs.
MFC after: 3 days
Modified:
head/sys/sys/cdefs.h
Modified: head/sys/sys/cdefs.h
==============================================================================
--- head/sys/sys/cdefs.h Wed Feb 4 20:03:57 2015 (r278221)
+++ head/sys/sys/cdefs.h Wed Feb 4 20:55:21 2015 (r278222)
@@ -293,7 +293,8 @@
#elif defined(__COUNTER__)
#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)
#define __Static_assert(x, y) ___Static_assert(x, y)
-#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1]
+#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \
+ __unused
#else
#define _Static_assert(x, y) struct __hack
#endif
More information about the svn-src-all
mailing list