fix unused type warning with poco_static_assert

This commit is contained in:
Guenter Obiltschnig 2015-09-29 14:55:51 +02:00
parent d4cdb91c01
commit 1d58c7436e
2 changed files with 14 additions and 14 deletions

View File

@ -148,11 +148,6 @@ protected:
//
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
GCC_DIAG_OFF(unused-local-typedefs) // supress numerous gcc warnings
#endif // POCO_COMPILER_GCC && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
template <bool x>
struct POCO_STATIC_ASSERTION_FAILURE;
@ -180,7 +175,7 @@ struct poco_static_assert_test
#else
#define poco_static_assert(B) \
typedef poco_static_assert_test<sizeof(POCO_STATIC_ASSERTION_FAILURE<(bool) (B)>)> \
POCO_JOIN(poco_static_assert_typedef_, __LINE__)
POCO_JOIN(poco_static_assert_typedef_, __LINE__) POCO_UNUSED
#endif

View File

@ -39,6 +39,7 @@
#define POCO_OS_QNX 0x000b
#define POCO_OS_VXWORKS 0x000c
#define POCO_OS_CYGWIN 0x000d
#define POCO_OS_NACL 0x000e
#define POCO_OS_UNKNOWN_UNIX 0x00ff
#define POCO_OS_WINDOWS_NT 0x1001
#define POCO_OS_WINDOWS_CE 0x1011
@ -58,6 +59,9 @@
#elif defined(__digital__) || defined(__osf__)
#define POCO_OS_FAMILY_UNIX 1
#define POCO_OS POCO_OS_TRU64
#elif defined(__NACL__)
#define POCO_OS_FAMILY_UNIX 1
#define POCO_OS POCO_OS_NACL
#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__TOS_LINUX__) || defined(EMSCRIPTEN)
#define POCO_OS_FAMILY_UNIX 1
#define POCO_OS POCO_OS_LINUX
@ -108,11 +112,6 @@
#endif
#ifndef POCO_OS_FAMILY_UNIX
#define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x)
#endif
//
// Hardware Architecture and Byte Order
//
@ -161,7 +160,6 @@
#else
#error "MIPS but neither MIPSEL nor MIPSEB?"
#endif
#elif defined(__hppa) || defined(__hppa__)
#define POCO_ARCH POCO_ARCH_HPPA
#define POCO_ARCH_BIG_ENDIAN 1
@ -243,8 +241,8 @@
#define POCO_COMPILER_CBUILDER
#elif defined (__DMC__)
#define POCO_COMPILER_DMARS
#elif defined (__HP_aCC)
#define POCO_COMPILER_HP_ACC
#elif defined (__DECCXX)
#define POCO_COMPILER_COMPAC
#elif (defined (__xlc__) || defined (__xlC__)) && defined(__IBMCPP__)
#define POCO_COMPILER_IBM_XLC // IBM XL C++
#elif defined (__IBMCPP__) && defined(__COMPILER_VER__)
@ -252,6 +250,13 @@
#endif
#ifdef __GNUC__
#define POCO_UNUSED __attribute__((unused))
#else
#define POCO_UNUSED
#endif // __GNUC__
#if !defined(POCO_ARCH)
#error "Unknown Hardware Architecture."
#endif