remove GCC_DIAG_OFF

This commit is contained in:
Guenter Obiltschnig 2015-09-30 12:16:09 +02:00
parent 4894222fe9
commit bcead85c25
18 changed files with 4 additions and 68 deletions

View File

@ -44,51 +44,6 @@
#endif
#ifdef __GNUC__
#ifndef __THROW
#ifndef __GNUC_PREREQ
#define __GNUC_PREREQ(maj, min) (0)
#endif
#if defined __cplusplus && __GNUC_PREREQ (2,8)
#define __THROW throw ()
#else
#define __THROW
#endif
#endif
//
// GCC diagnostics enable/disable by Patrick Horgan, see
// http://dbp-consulting.com/tutorials/SuppressingGCCWarnings.html
// use example: GCC_DIAG_OFF(unused-variable)
//
#if defined(POCO_COMPILER_GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 406)
#ifdef GCC_DIAG_OFF
#undef GCC_DIAG_OFF
#endif
#ifdef GCC_DIAG_ON
#undef GCC_DIAG_ON
#endif
#define GCC_DIAG_STR(s) #s
#define GCC_DIAG_JOINSTR(x,y) GCC_DIAG_STR(x ## y)
#define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x)
#define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x)
#if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
#define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) \
GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x))
#define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop)
#else
#define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored GCC_DIAG_JOINSTR(-W,x))
#define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning GCC_DIAG_JOINSTR(-W,x))
#endif
#else
#define GCC_DIAG_OFF(x)
#define GCC_DIAG_ON(x)
#endif
#endif // __GNUC__
//
// No syslog.h on QNX/BB10
//

View File

@ -20,7 +20,6 @@
extern "C"
{
#include "pcre_config.h"
GCC_DIAG_OFF(unused-function) // pcre_memmove unused function warning
#include "pcre_internal.h"
}

View File

@ -18,11 +18,12 @@
#include "Poco/Bugcheck.h"
#include <vector>
GCC_DIAG_OFF(unused-but-set-variable)
#if defined(_MSC_VER) && _MSC_VER < 1400
#pragma warning(disable:4800)//forcing value to bool 'true' or 'false'
#endif
using namespace Poco;

View File

@ -18,7 +18,6 @@
#include "Poco/Exception.h"
#include "TestPlugin.h"
GCC_DIAG_OFF(unused-variable)
using Poco::ClassLoader;
using Poco::Manifest;

View File

@ -31,7 +31,6 @@
#include <vector>
#include <cstring>
GCC_DIAG_OFF(unused-variable)
using Poco::Bugcheck;
using Poco::Exception;

View File

@ -19,9 +19,6 @@
#include "Poco/Exception.h"
GCC_DIAG_OFF(unused-variable)
using Poco::Timestamp;
using Poco::DateTime;
using Poco::Timespan;

View File

@ -21,7 +21,6 @@
#include <fstream>
#include <set>
GCC_DIAG_OFF(unused-variable)
using Poco::File;
using Poco::TemporaryFile;

View File

@ -17,7 +17,6 @@
#include "Poco/Exception.h"
#include <map>
GCC_DIAG_OFF(unused-variable)
using Poco::HashMap;

View File

@ -17,9 +17,6 @@
#include "Poco/NumberFormatter.h"
GCC_DIAG_OFF(unused-variable)
using namespace Poco;

View File

@ -17,7 +17,6 @@
#include "Poco/Exception.h"
#include <map>
GCC_DIAG_OFF(unused-variable)
using Poco::ListMap;

View File

@ -18,7 +18,6 @@
#include "Poco/PatternFormatter.h"
#include "Poco/AutoPtr.h"
GCC_DIAG_OFF(unused-variable)
using Poco::LoggingRegistry;
using Poco::Channel;

View File

@ -16,7 +16,6 @@
#include "Poco/NamedTuple.h"
#include "Poco/Exception.h"
GCC_DIAG_OFF(unused-but-set-variable)
using Poco::NamedTuple;
using Poco::Int8;

View File

@ -17,9 +17,6 @@
#include "Poco/NumberFormatter.h"
GCC_DIAG_OFF(unused-variable)
using namespace Poco;

View File

@ -16,7 +16,6 @@
#include "Poco/StringTokenizer.h"
#include "Poco/Exception.h"
GCC_DIAG_OFF(unused-variable)
using Poco::StringTokenizer;
using Poco::RangeException;

View File

@ -18,11 +18,12 @@
#include "Poco/Void.h"
#include <iostream>
GCC_DIAG_OFF(unused-but-set-variable)
#if defined(_MSC_VER)
# pragma warning(disable:4800) // forcing value to bool 'true' or 'false' on MSVC 71
#endif
using Poco::TypeList;
using Poco::Tuple;
using Poco::NullTypeList;

View File

@ -22,7 +22,6 @@
#include <utility>
GCC_DIAG_OFF(unused-variable)
#if defined(_MSC_VER) && _MSC_VER < 1400
#pragma warning(disable:4800)//forcing value to bool 'true' or 'false'
#endif

View File

@ -21,7 +21,6 @@
#include "Poco/Exception.h"
#include "CppUnit/TestCase.h"
GCC_DIAG_OFF(unused-but-set-variable)
class VarTest: public CppUnit::TestCase
{

View File

@ -18,7 +18,6 @@
#include "Poco/Net/NetException.h"
#include <sstream>
GCC_DIAG_OFF(parentheses)
using Poco::Net::HTTPResponse;
using Poco::Net::HTTPMessage;