diff --git a/config.h b/config.h index b4a4bc54..66292257 100644 --- a/config.h +++ b/config.h @@ -354,7 +354,7 @@ NAMESPACE_END // 4786: identifier was truncated in debug information // 4355: 'this' : used in base member initializer list // 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 // 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) diff --git a/dll.cpp b/dll.cpp index 7b57dc1f..bc406de2 100644 --- a/dll.cpp +++ b/dll.cpp @@ -5,15 +5,10 @@ #include "dll.h" #include "config.h" +#include "iterhash.h" -// TODO: fix the C4589 warnings -#if CRYPTOPP_MSC_VERSION -# pragma warning(disable: 4589) -#endif - -#if CRYPTOPP_MSC_VERSION -# pragma warning(default: 4660) -#endif +// Cast from FARPROC to funcptr with args, http://stackoverflow.com/q/4192058/608639 +#pragma warning(disable: 4191) #if defined(CRYPTOPP_EXPORTS) && defined(CRYPTOPP_WIN32_AVAILABLE) #include @@ -70,9 +65,6 @@ static void * New (size_t size) return p; } -// Cast from FARPROC to funcptr with args, http://stackoverflow.com/q/4192058/608639 -#pragma warning(disable: 4191) - static void SetNewAndDeleteFunctionPointers() { void *p = NULLPTR; diff --git a/validate.h b/validate.h index 80386778..9e25e1bb 100644 --- a/validate.h +++ b/validate.h @@ -182,7 +182,7 @@ private: #endif // 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) tm localTime = {};