diff options
author | Bernard Normier <bernard@zeroc.com> | 2012-08-09 17:05:42 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2012-08-09 17:05:42 -0400 |
commit | a9e44ca45db29a778490b52f4e6b7717e1ca93de (patch) | |
tree | 293fb8f892f096c49fc8f151be0af34181ed7c26 /cpp | |
parent | Fixed file permission (diff) | |
download | ice-a9e44ca45db29a778490b52f4e6b7717e1ca93de.tar.bz2 ice-a9e44ca45db29a778490b52f4e6b7717e1ca93de.tar.xz ice-a9e44ca45db29a778490b52f4e6b7717e1ca93de.zip |
Cleaned up warning-disabling on Windows
Diffstat (limited to 'cpp')
-rwxr-xr-x | cpp/config/Make.rules.msvc | 6 | ||||
-rw-r--r-- | cpp/include/Ice/BasicStream.h | 2 | ||||
-rw-r--r-- | cpp/include/IceUtil/Config.h | 12 | ||||
-rw-r--r-- | cpp/include/IceUtil/DisableWarnings.h | 2 | ||||
-rw-r--r-- | cpp/src/Ice/DefaultsAndOverrides.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Ice/LocatorInfo.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Ice/Network.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceGrid/InternalRegistryI.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceGrid/ServerCache.cpp | 1 | ||||
-rwxr-xr-x | cpp/src/IceGrid/ServerI.cpp | 1 | ||||
-rw-r--r-- | cpp/src/iceserviceinstall/ServiceInstaller.cpp | 3 | ||||
-rwxr-xr-x | cpp/src/slice2confluence/Gen.cpp | 4 | ||||
-rwxr-xr-x | cpp/src/slice2html/Gen.cpp | 4 | ||||
-rw-r--r-- | cpp/test/IceUtil/condvar/WorkQueue.cpp | 4 |
15 files changed, 21 insertions, 23 deletions
diff --git a/cpp/config/Make.rules.msvc b/cpp/config/Make.rules.msvc index dc2853d0cc3..92f94704b7e 100755 --- a/cpp/config/Make.rules.msvc +++ b/cpp/config/Make.rules.msvc @@ -102,7 +102,13 @@ ICE_OS_LIBS = kernel32.lib user32.lib !else ICE_OS_LIBS = rpcrt4.lib advapi32.lib BZIP2_LIBS = libbz2$(LIBSUFFIX).lib + +!if "$(CPP_COMPILER)" == "VC110" +DB_LIBS = libdb53$(LIBSUFFIX).lib +!else DB_LIBS = libdb48$(LIBSUFFIX).lib +!endif + MCPP_LIBS = mcpp$(LIBSUFFIX).lib ICONV_LIB = libiconv.lib !endif diff --git a/cpp/include/Ice/BasicStream.h b/cpp/include/Ice/BasicStream.h index 9f4cbe33be2..be0fc033ef1 100644 --- a/cpp/include/Ice/BasicStream.h +++ b/cpp/include/Ice/BasicStream.h @@ -603,7 +603,7 @@ public: { throwUnmarshalOutOfBoundsException(__FILE__, __LINE__); } - v = *i++; + v = (0 != *i++); } void read(std::vector<bool>&); bool* read(std::pair<const bool*, const bool*>&); diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h index 2fb166f0e72..ea9371ca845 100644 --- a/cpp/include/IceUtil/Config.h +++ b/cpp/include/IceUtil/Config.h @@ -107,20 +107,12 @@ # include <windows.h> # ifdef _MSC_VER -// '...' : forcing value to bool 'true' or 'false' (performance warning) -# pragma warning( disable : 4800 ) -// ... identifier was truncated to '255' characters in the debug information -# pragma warning( disable : 4786 ) -// 'this' : used in base member initializer list -# pragma warning( disable : 4355 ) -// class ... needs to have dll-interface to be used by clients of class ... -# pragma warning( disable : 4251 ) // ... : inherits ... via dominance # pragma warning( disable : 4250 ) +// class ... needs to have dll-interface to be used by clients of class ... +# pragma warning( disable : 4251 ) // non dll-interface class ... used as base for dll-interface class ... # pragma warning( disable : 4275 ) -// ...: decorated name length exceeded, name was truncated -# pragma warning( disable : 4503 ) # endif #endif diff --git a/cpp/include/IceUtil/DisableWarnings.h b/cpp/include/IceUtil/DisableWarnings.h index e67c202d6ea..e6f05da2918 100644 --- a/cpp/include/IceUtil/DisableWarnings.h +++ b/cpp/include/IceUtil/DisableWarnings.h @@ -22,4 +22,6 @@ #if defined(_MSC_VER) # define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated/ # pragma warning( 4 : 4996 ) // C4996 'std::<function>' was declared deprecated +# pragma warning( 4 : 4800 ) // C4800 forcing value to bool 'true' or 'false' (performance warning) + #endif diff --git a/cpp/src/Ice/DefaultsAndOverrides.cpp b/cpp/src/Ice/DefaultsAndOverrides.cpp index 43e654463f8..7914e17a5a1 100644 --- a/cpp/src/Ice/DefaultsAndOverrides.cpp +++ b/cpp/src/Ice/DefaultsAndOverrides.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/DefaultsAndOverrides.h> #include <Ice/Properties.h> #include <Ice/Network.h> diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp index 9d5442d6409..15c78d1fcd7 100644 --- a/cpp/src/Ice/LocatorInfo.cpp +++ b/cpp/src/Ice/LocatorInfo.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/LocatorInfo.h> #include <Ice/Locator.h> #include <Ice/LocalException.h> diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 1258fa186a9..3a2f6d402e3 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -17,6 +17,7 @@ # include <netinet/in.h> #endif +#include <IceUtil/DisableWarnings.h> #include <Ice/Network.h> #include <IceUtil/StringUtil.h> #include <IceUtil/Unicode.h> diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index 007d1c275a2..a5bfa8c4af8 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/OutgoingAsync.h> #include <Ice/Object.h> #include <Ice/ConnectionI.h> diff --git a/cpp/src/IceGrid/InternalRegistryI.cpp b/cpp/src/IceGrid/InternalRegistryI.cpp index 02134635c90..8d5f7b081ed 100644 --- a/cpp/src/IceGrid/InternalRegistryI.cpp +++ b/cpp/src/IceGrid/InternalRegistryI.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/Ice.h> #include <IceGrid/RegistryI.h> diff --git a/cpp/src/IceGrid/ServerCache.cpp b/cpp/src/IceGrid/ServerCache.cpp index df7bcd37325..d9be593a4af 100644 --- a/cpp/src/IceGrid/ServerCache.cpp +++ b/cpp/src/IceGrid/ServerCache.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <Ice/LoggerUtil.h> #include <Ice/Communicator.h> #include <Ice/LocalException.h> diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index ea53de6b671..1eb80d965f3 100755 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -7,6 +7,7 @@ // // ********************************************************************** +#include <IceUtil/DisableWarnings.h> #include <IceUtil/FileUtil.h> #include <Ice/Ice.h> #include <Ice/Instance.h> diff --git a/cpp/src/iceserviceinstall/ServiceInstaller.cpp b/cpp/src/iceserviceinstall/ServiceInstaller.cpp index dd046a0755a..0eb36071ddb 100644 --- a/cpp/src/iceserviceinstall/ServiceInstaller.cpp +++ b/cpp/src/iceserviceinstall/ServiceInstaller.cpp @@ -7,8 +7,7 @@ // // ********************************************************************** -#define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated - +#include <IceUtil/DisableWarnings.h> #include <ServiceInstaller.h> #include <IceUtil/StringUtil.h> #include <IceUtil/FileUtil.h> diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp index 80459a650df..42425db59cd 100755 --- a/cpp/src/slice2confluence/Gen.cpp +++ b/cpp/src/slice2confluence/Gen.cpp @@ -7,10 +7,6 @@ // // ********************************************************************** -#if defined(_MSC_VER) -# define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated -#endif - #include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include <IceUtil/StringUtil.h> diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp index 6472f661e45..08eed8b4cf6 100755 --- a/cpp/src/slice2html/Gen.cpp +++ b/cpp/src/slice2html/Gen.cpp @@ -7,10 +7,6 @@ // // ********************************************************************** -#if defined(_MSC_VER) -# define _CRT_SECURE_NO_DEPRECATE 1 // C4996 '<C function>' was declared deprecated -#endif - #include <IceUtil/DisableWarnings.h> #include <IceUtil/Functional.h> #include <IceUtil/StringUtil.h> diff --git a/cpp/test/IceUtil/condvar/WorkQueue.cpp b/cpp/test/IceUtil/condvar/WorkQueue.cpp index 63e3a8b56ee..7d093b7279e 100644 --- a/cpp/test/IceUtil/condvar/WorkQueue.cpp +++ b/cpp/test/IceUtil/condvar/WorkQueue.cpp @@ -262,7 +262,7 @@ main(int argc, char** argv) for(i = 0; i < 100; i++) { - TestThreadPtr p = new TestThread(cd, signalQ, i % 2); + TestThreadPtr p = new TestThread(cd, signalQ, i % 2 != 0); p->start(); testThreads.push_back(p); } @@ -275,7 +275,7 @@ main(int argc, char** argv) for(i = 0; i < 100; i++) { - TestThreadPtr p = new TestThread(cd, broadcastQ, i % 2); + TestThreadPtr p = new TestThread(cd, broadcastQ, i % 2 != 0); p->start(); testThreads.push_back(p); } |