diff options
author | kosak <kosak@google.com> | 2013-12-03 22:38:22 +0000 |
---|---|---|
committer | kosak <kosak@google.com> | 2013-12-03 22:38:22 +0000 |
commit | 37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a (patch) | |
tree | 0949bd9f08f265d8b29d513095775a69964dee0e /src | |
parent | aa34ae250800af7e98499abba44636503cf99b16 (diff) | |
download | googletest-37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a.tar.gz googletest-37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a.tar.bz2 googletest-37b97d1c93fb8283f8bbf54f5618c1c1e5a4726a.zip |
Add MemorySanitizer annotations in gtest printers. Also remove unused variable kPathSeparatorString.
Diffstat (limited to 'src')
-rw-r--r-- | src/gtest-filepath.cc | 2 | ||||
-rw-r--r-- | src/gtest-printers.cc | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gtest-filepath.cc b/src/gtest-filepath.cc index 6be58b6f..d221cfde 100644 --- a/src/gtest-filepath.cc +++ b/src/gtest-filepath.cc @@ -70,7 +70,6 @@ namespace internal { // of them. const char kPathSeparator = '\\'; const char kAlternatePathSeparator = '/'; -const char kPathSeparatorString[] = "\\"; const char kAlternatePathSeparatorString[] = "/"; # if GTEST_OS_WINDOWS_MOBILE // Windows CE doesn't have a current directory. You should not use @@ -84,7 +83,6 @@ const char kCurrentDirectoryString[] = ".\\"; # endif // GTEST_OS_WINDOWS_MOBILE #else const char kPathSeparator = '/'; -const char kPathSeparatorString[] = "/"; const char kCurrentDirectoryString[] = "./"; #endif // GTEST_OS_WINDOWS diff --git a/src/gtest-printers.cc b/src/gtest-printers.cc index 75fa4081..0db5b44a 100644 --- a/src/gtest-printers.cc +++ b/src/gtest-printers.cc @@ -56,6 +56,7 @@ namespace { using ::std::ostream; // Prints a segment of bytes in the given object. +GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start, size_t count, ostream* os) { char text[5] = ""; @@ -252,6 +253,7 @@ void PrintTo(wchar_t wc, ostream* os) { // The array starts at begin, the length is len, it may include '\0' characters // and may not be NUL-terminated. template <typename CharType> +GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ static void PrintCharsAsStringTo( const CharType* begin, size_t len, ostream* os) { const char* const kQuoteBegin = sizeof(CharType) == 1 ? "\"" : "L\""; @@ -273,6 +275,7 @@ static void PrintCharsAsStringTo( // Prints a (const) char/wchar_t array of 'len' elements, starting at address // 'begin'. CharType must be either char or wchar_t. template <typename CharType> +GTEST_ATTRIBUTE_NO_SANITIZE_MEMORY_ static void UniversalPrintCharArray( const CharType* begin, size_t len, ostream* os) { // The code |