Commit 6d425367 authored by 's avatar

Reduce the number of warnings by VS2010



git-svn-id: https://google-glog.googlecode.com/svn/trunk@112 eb4d4688-79bd-11dd-afb4-1d65580434c0
parent e7712bf0
......@@ -107,7 +107,9 @@
#if defined(NO_THREADS)
typedef int MutexType; // to keep a lock-count
#elif defined(_WIN32) || defined(__CYGWIN32__) || defined(__CYGWIN64__)
# define WIN32_LEAN_AND_MEAN // We only need minimal includes
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN // We only need minimal includes
# endif
# ifdef GMUTEX_TRYLOCK
// We need Windows NT or later for TryEnterCriticalSection(). If you
// don't need that functionality, you can remove these _WIN32_WINNT
......@@ -117,9 +119,13 @@
# endif
# endif
// To avoid macro definition of ERROR.
# define NOGDI
# ifndef NOGDI
# define NOGDI
# endif
// To avoid macro definition of min/max.
# define NOMINMAX
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <windows.h>
typedef CRITICAL_SECTION MutexType;
#elif defined(HAVE_PTHREAD) && defined(HAVE_RWLOCK)
......
......@@ -608,7 +608,7 @@ std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
#endif
std::strstream ss;
ss << names << " (" << v1 << " vs. " << v2 << ")";
return new std::string(ss.str(), ss.pcount());
return new std::string(ss.str(), static_cast<unsigned int>(ss.pcount()));
}
// Helper functions for CHECK_OP macro.
......
......@@ -612,7 +612,7 @@ std::string* MakeCheckOpString(const t1& v1, const t2& v2, const char* names) {
#endif
std::strstream ss;
ss << names << " (" << v1 << " vs. " << v2 << ")";
return new std::string(ss.str(), ss.pcount());
return new std::string(ss.str(), static_cast<unsigned int>(ss.pcount()));
}
// Helper functions for CHECK_OP macro.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment