Removed MSVC warning suppression for many warnings (Issue 412)
Most of these appear to have been cleared over the last couple of years. C4127 is too prevelant. We are probably going to have to live with it. We may be able to clear C4250 with a using statement. For example 'using ASN1CryptoMaterial::Load'. MSVC resisted clearing C4661 by pushing/poping in iterhash.h and osrng.h. It was like MSVC simply ignored it.pull/424/head
parent
b083390d4f
commit
5f0cbde980
2
config.h
2
config.h
|
|
@ -354,7 +354,7 @@ NAMESPACE_END
|
||||||
// 4786: identifier was truncated in debug information
|
// 4786: identifier was truncated in debug information
|
||||||
// 4355: 'this' : used in base member initializer list
|
// 4355: 'this' : used in base member initializer list
|
||||||
// 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
|
// 4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
|
||||||
# pragma warning(disable: 4127 4231 4250 4251 4275 4505 4512 4660 4661 4786 4355 4910)
|
# pragma warning(disable: 4127 4512 4661)
|
||||||
// Security related, possible defects
|
// Security related, possible defects
|
||||||
// http://blogs.msdn.com/b/vcblog/archive/2010/12/14/off-by-default-compiler-warnings-in-visual-c.aspx
|
// http://blogs.msdn.com/b/vcblog/archive/2010/12/14/off-by-default-compiler-warnings-in-visual-c.aspx
|
||||||
# pragma warning(once: 4191 4242 4263 4264 4266 4302 4826 4905 4906 4928)
|
# pragma warning(once: 4191 4242 4263 4264 4266 4302 4826 4905 4906 4928)
|
||||||
|
|
|
||||||
14
dll.cpp
14
dll.cpp
|
|
@ -5,15 +5,10 @@
|
||||||
|
|
||||||
#include "dll.h"
|
#include "dll.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
#include "iterhash.h"
|
||||||
|
|
||||||
// TODO: fix the C4589 warnings
|
// Cast from FARPROC to funcptr with args, http://stackoverflow.com/q/4192058/608639
|
||||||
#if CRYPTOPP_MSC_VERSION
|
#pragma warning(disable: 4191)
|
||||||
# pragma warning(disable: 4589)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CRYPTOPP_MSC_VERSION
|
|
||||||
# pragma warning(default: 4660)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CRYPTOPP_EXPORTS) && defined(CRYPTOPP_WIN32_AVAILABLE)
|
#if defined(CRYPTOPP_EXPORTS) && defined(CRYPTOPP_WIN32_AVAILABLE)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
@ -70,9 +65,6 @@ static void * New (size_t size)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cast from FARPROC to funcptr with args, http://stackoverflow.com/q/4192058/608639
|
|
||||||
#pragma warning(disable: 4191)
|
|
||||||
|
|
||||||
static void SetNewAndDeleteFunctionPointers()
|
static void SetNewAndDeleteFunctionPointers()
|
||||||
{
|
{
|
||||||
void *p = NULLPTR;
|
void *p = NULLPTR;
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Safer functions on Windows for C&A, https://github.com/weidai11/cryptopp/issues/55
|
// Safer functions on Windows for C&A, https://github.com/weidai11/cryptopp/issues/55
|
||||||
static std::string TimeToString(const time_t& t)
|
inline std::string TimeToString(const time_t& t)
|
||||||
{
|
{
|
||||||
#if (CRYPTOPP_MSC_VERSION >= 1400)
|
#if (CRYPTOPP_MSC_VERSION >= 1400)
|
||||||
tm localTime = {};
|
tm localTime = {};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue