Browse Source

Fix MSVC C4826 issues in googletest.

This applies https://github.com/google/googletest/pull/991.

BUG=129

Change-Id: I3df7e265652f2a337721634b5ba8adf76ff7d828
Reviewed-on: https://boringssl-review.googlesource.com/13233
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 years ago
parent
commit
9fb326d47e
3 changed files with 5 additions and 2 deletions
  1. +1
    -0
      third_party/googletest/METADATA
  2. +2
    -2
      third_party/googletest/include/gtest/gtest-printers.h
  3. +2
    -0
      third_party/googletest/include/gtest/internal/gtest-port.h

+ 1
- 0
third_party/googletest/METADATA View File

@@ -13,4 +13,5 @@ third_party {
"Only googletest, not googlemock, is included."
" "
"https://github.com/google/googletest/pull/965 was applied."
"https://github.com/google/googletest/pull/991 was applied."
}

+ 2
- 2
third_party/googletest/include/gtest/gtest-printers.h View File

@@ -423,9 +423,9 @@ void DefaultPrintTo(IsNotContainer /* dummy */,
// void*. However, we cannot cast it to const void* directly,
// even using reinterpret_cast, as earlier versions of gcc
// (e.g. 3.4.5) cannot compile the cast when p is a function
// pointer. Casting to UInt64 first solves the problem.
// pointer. Casting to UIntPtr first solves the problem.
*os << reinterpret_cast<const void*>(
reinterpret_cast<internal::UInt64>(p));
reinterpret_cast<internal::UIntPtr>(p));
}
}
}


+ 2
- 0
third_party/googletest/include/gtest/internal/gtest-port.h View File

@@ -243,6 +243,7 @@
// TypeWithSize - maps an integer to a int type.
// Int32, UInt32, Int64, UInt64, TimeInMillis
// - integers of known sizes.
// UIntPtr - unsigned integer with the size of a pointer.
// BiggestInt - the biggest signed integer type.
//
// Command-line utilities:
@@ -2522,6 +2523,7 @@ typedef TypeWithSize<4>::Int Int32;
typedef TypeWithSize<4>::UInt UInt32;
typedef TypeWithSize<8>::Int Int64;
typedef TypeWithSize<8>::UInt UInt64;
typedef TypeWithSize<sizeof(void*)>::UInt UIntPtr;
typedef TypeWithSize<8>::Int TimeInMillis; // Represents time in milliseconds.

// Utilities for command line flags and environment variables.


Loading…
Cancel
Save