Avoid warning for type punning like
src/logging_unittest.cc:591: warning: dereferencing type-punned pointer will break strict-aliasing rules As we'll never dereference the casted pointers, it's OK to silence this warning. git-svn-id: https://google-glog.googlecode.com/svn/trunk@67 eb4d4688-79bd-11dd-afb4-1d65580434c0
This commit is contained in:
parent
fcbeeb9f35
commit
5bf76bb4d5
@ -586,10 +586,10 @@ TEST(CheckNOTNULL, Simple) {
|
||||
void *ptr = static_cast<void *>(&t);
|
||||
void *ref = CHECK_NOTNULL(ptr);
|
||||
EXPECT_EQ(ptr, ref);
|
||||
CHECK_NOTNULL(reinterpret_cast<char *>(&t));
|
||||
CHECK_NOTNULL(reinterpret_cast<unsigned char *>(&t));
|
||||
CHECK_NOTNULL(reinterpret_cast<int *>(&t));
|
||||
CHECK_NOTNULL(reinterpret_cast<int64 *>(&t));
|
||||
CHECK_NOTNULL(reinterpret_cast<char *>(ptr));
|
||||
CHECK_NOTNULL(reinterpret_cast<unsigned char *>(ptr));
|
||||
CHECK_NOTNULL(reinterpret_cast<int *>(ptr));
|
||||
CHECK_NOTNULL(reinterpret_cast<int64 *>(ptr));
|
||||
}
|
||||
|
||||
TEST(DeathCheckNN, Simple) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user