From ca642a925ee8d631fc5b8def9abbc8cadd18c3c0 Mon Sep 17 00:00:00 2001 From: daquexian Date: Thu, 2 May 2019 21:47:49 +0800 Subject: [PATCH] Fix -Wsign-conversion error by adding static_cast --- googletest/src/gtest-printers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc index a7c5e002..3337be31 100644 --- a/googletest/src/gtest-printers.cc +++ b/googletest/src/gtest-printers.cc @@ -237,7 +237,7 @@ void PrintCharAndCodeTo(Char c, ostream* os) { if (format == kHexEscape || (1 <= c && c <= 9)) { // Do nothing. } else { - *os << ", 0x" << String::FormatHexInt(static_cast(c)); + *os << ", 0x" << String::FormatHexInt(static_cast(c)); } *os << ")"; }