Fixed warnings in googletest
This commit is contained in:
parent
6f207497de
commit
93086957a9
@ -601,7 +601,7 @@ class GTestFlagSaver {
|
|||||||
bool list_tests_;
|
bool list_tests_;
|
||||||
String output_;
|
String output_;
|
||||||
bool print_time_;
|
bool print_time_;
|
||||||
bool pretty_;
|
// bool pretty_;
|
||||||
internal::Int32 random_seed_;
|
internal::Int32 random_seed_;
|
||||||
internal::Int32 repeat_;
|
internal::Int32 repeat_;
|
||||||
bool shuffle_;
|
bool shuffle_;
|
||||||
@ -7497,7 +7497,7 @@ namespace internal {
|
|||||||
// of them.
|
// of them.
|
||||||
const char kPathSeparator = '\\';
|
const char kPathSeparator = '\\';
|
||||||
const char kAlternatePathSeparator = '/';
|
const char kAlternatePathSeparator = '/';
|
||||||
const char kPathSeparatorString[] = "\\";
|
// const char kPathSeparatorString[] = "\\";
|
||||||
const char kAlternatePathSeparatorString[] = "/";
|
const char kAlternatePathSeparatorString[] = "/";
|
||||||
# if GTEST_OS_WINDOWS_MOBILE
|
# if GTEST_OS_WINDOWS_MOBILE
|
||||||
// Windows CE doesn't have a current directory. You should not use
|
// Windows CE doesn't have a current directory. You should not use
|
||||||
@ -7511,7 +7511,7 @@ const char kCurrentDirectoryString[] = ".\\";
|
|||||||
# endif // GTEST_OS_WINDOWS_MOBILE
|
# endif // GTEST_OS_WINDOWS_MOBILE
|
||||||
#else
|
#else
|
||||||
const char kPathSeparator = '/';
|
const char kPathSeparator = '/';
|
||||||
const char kPathSeparatorString[] = "/";
|
// const char kPathSeparatorString[] = "/";
|
||||||
const char kCurrentDirectoryString[] = "./";
|
const char kCurrentDirectoryString[] = "./";
|
||||||
#endif // GTEST_OS_WINDOWS
|
#endif // GTEST_OS_WINDOWS
|
||||||
|
|
||||||
|
@ -18336,6 +18336,12 @@ AssertionResult CmpHelperEQ(const char* expected_expression,
|
|||||||
# pragma warning(push) // Saves the current warning state.
|
# pragma warning(push) // Saves the current warning state.
|
||||||
# pragma warning(disable:4389) // Temporarily disables warning on
|
# pragma warning(disable:4389) // Temporarily disables warning on
|
||||||
// signed/unsigned mismatch.
|
// signed/unsigned mismatch.
|
||||||
|
#elif __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wsign-compare"
|
||||||
|
#elif __GNUC__
|
||||||
|
#pragma gcc diagnostic push
|
||||||
|
#pragma gcc diagnostic ignored "-Wsign-compare"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (expected == actual) {
|
if (expected == actual) {
|
||||||
@ -18344,6 +18350,10 @@ AssertionResult CmpHelperEQ(const char* expected_expression,
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# pragma warning(pop) // Restores the warning state.
|
# pragma warning(pop) // Restores the warning state.
|
||||||
|
#elif __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#elif __GNUC__
|
||||||
|
#pragma gcc diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return EqFailure(expected_expression,
|
return EqFailure(expected_expression,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user