Skip to content

Commit

Permalink
Suppress a warning in gmock
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Aug 26, 2017
1 parent 70ef82a commit 466386d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/gmock/gmock.h
Original file line number Diff line number Diff line change
Expand Up @@ -825,8 +825,9 @@ template <typename T> struct DecayArray<T[]> {
// crashes).
template <typename T>
inline T Invalid() {
void *p = NULL;
return const_cast<typename remove_reference<T>::type&>(
*static_cast<volatile typename remove_reference<T>::type*>(NULL));
*static_cast<volatile typename remove_reference<T>::type*>(p));
}
template <>
inline void Invalid<void>() {}
Expand Down

0 comments on commit 466386d

Please sign in to comment.