From 466386d5cd0154097a4fce73d41360a10bf6d38c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 21 Aug 2017 06:41:03 -0700 Subject: [PATCH] Suppress a warning in gmock --- test/gmock/gmock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/gmock/gmock.h b/test/gmock/gmock.h index 84f58cdd..8fd9c90c 100644 --- a/test/gmock/gmock.h +++ b/test/gmock/gmock.h @@ -825,8 +825,9 @@ template struct DecayArray { // crashes). template inline T Invalid() { + void *p = NULL; return const_cast::type&>( - *static_cast::type*>(NULL)); + *static_cast::type*>(p)); } template <> inline void Invalid() {}