freebsd-ports/emulators/open-vm-tools/files/patch-lib__include__vm_assert.h
Dimitry Andric 63e8b9315e Fix -Werror warnings from clang 3.6.0 and higher about unused local
typedefs, which are used for hand-implementing compile-time assertions,
by adding an __unused__ attribute.

Approved by:	maintainer (swills)
PR:		198202
2015-03-02 21:36:51 +00:00

12 lines
453 B
C

--- lib/include/vm_assert.h.orig 2013-09-23 17:51:10.000000000 +0200
+++ lib/include/vm_assert.h 2015-02-04 15:55:56.011187000 +0100
@@ -363,7 +363,8 @@
#define ASSERT_ON_COMPILE(e) \
do { \
enum { AssertOnCompileMisused = ((e) ? 1 : -1) }; \
- typedef char AssertOnCompileFailed[AssertOnCompileMisused]; \
+ typedef char AssertOnCompileFailed[AssertOnCompileMisused] \
+ __attribute__((__unused__)); \
} while (0)