From: Date: Wed, 13 Jun 2012 07:25:19 +0000 (+0000) Subject: Reduce the number of warnings by VS2010 X-Git-Tag: accepted/tizen/5.0/unified/20181102.024921~124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d42536769806d6aa875866ca5072937f57f5e49;p=platform%2Fupstream%2Fglog.git Reduce the number of warnings by VS2010 git-svn-id: https://google-glog.googlecode.com/svn/trunk@112 eb4d4688-79bd-11dd-afb4-1d65580434c0 --- diff --git a/src/base/mutex.h b/src/base/mutex.h index 7ba88cb..37527d5 100644 --- a/src/base/mutex.h +++ b/src/base/mutex.h @@ -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 typedef CRITICAL_SECTION MutexType; #elif defined(HAVE_PTHREAD) && defined(HAVE_RWLOCK) diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index d9aca8a..71859a9 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -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(ss.pcount())); } // Helper functions for CHECK_OP macro. diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h index f854a06..76c38cd 100755 --- a/src/windows/glog/logging.h +++ b/src/windows/glog/logging.h @@ -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(ss.pcount())); } // Helper functions for CHECK_OP macro.