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() {}