From 1d58c7436ee2d90d93652b0f83a6d82d1bf5d597 Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Tue, 29 Sep 2015 14:55:51 +0200 Subject: [PATCH] fix unused type warning with poco_static_assert --- Foundation/include/Poco/Bugcheck.h | 7 +------ Foundation/include/Poco/Platform.h | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Foundation/include/Poco/Bugcheck.h b/Foundation/include/Poco/Bugcheck.h index d11b2bbb5..941676029 100644 --- a/Foundation/include/Poco/Bugcheck.h +++ b/Foundation/include/Poco/Bugcheck.h @@ -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 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)> \ - POCO_JOIN(poco_static_assert_typedef_, __LINE__) + POCO_JOIN(poco_static_assert_typedef_, __LINE__) POCO_UNUSED #endif diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h index 4890d7a5a..def8f0733 100644 --- a/Foundation/include/Poco/Platform.h +++ b/Foundation/include/Poco/Platform.h @@ -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