From 35ba669307e20f09d6048f8cdf3643d2b2cb9f84 Mon Sep 17 00:00:00 2001 From: Date: Thu, 31 Jan 2013 03:48:24 +0000 Subject: [PATCH] Revert http://code.google.com/p/google-glog/source/detail?r=127 Casting to (void) was bad because the return value of DCHECK_NOTNULL cannot be used. git-svn-id: https://google-glog.googlecode.com/svn/trunk@128 eb4d4688-79bd-11dd-afb4-1d65580434c0 --- src/glog/logging.h.in | 4 +++- src/windows/glog/logging.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index f34dbe4..57d077f 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -1037,7 +1037,9 @@ const LogSeverity GLOG_0 = GLOG_ERROR; while (false) \ GLOG_MSVC_POP_WARNING() CHECK_GT(val1, val2) -#define DCHECK_NOTNULL(val) (void)(val) +// You may see warnings in release mode if you don't use the return +// value of DCHECK_NOTNULL. Please just use DCHECK for such cases. +#define DCHECK_NOTNULL(val) (val) #define DCHECK_STREQ(str1, str2) \ GLOG_MSVC_PUSH_DISABLE_WARNING(4127) \ diff --git a/src/windows/glog/logging.h b/src/windows/glog/logging.h index 05aba8c..162669e 100755 --- a/src/windows/glog/logging.h +++ b/src/windows/glog/logging.h @@ -1041,7 +1041,9 @@ const LogSeverity GLOG_0 = GLOG_ERROR; while (false) \ GLOG_MSVC_POP_WARNING() CHECK_GT(val1, val2) -#define DCHECK_NOTNULL(val) (void)(val) +// You may see warnings in release mode if you don't use the return +// value of DCHECK_NOTNULL. Please just use DCHECK for such cases. +#define DCHECK_NOTNULL(val) (val) #define DCHECK_STREQ(str1, str2) \ GLOG_MSVC_PUSH_DISABLE_WARNING(4127) \ -- 2.7.4