From 8317b9a01cbc32594ad4bf971709c97cb13ec921 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 6 Oct 2022 12:31:33 -0700 Subject: Fix "unsafe narrowing" warnings in absl, 11/n. Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on the logging facility.) Bug: chromium:1292951 PiperOrigin-RevId: 479384741 Change-Id: Id450438ea3781ce25137366ca16757e810020ad4 --- absl/log/log_format_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'absl/log/log_format_test.cc') diff --git a/absl/log/log_format_test.cc b/absl/log/log_format_test.cc index 3fdb358a..c629fce7 100644 --- a/absl/log/log_format_test.cc +++ b/absl/log/log_format_test.cc @@ -108,7 +108,7 @@ TYPED_TEST(CharLogFormatTest, Printable) { TYPED_TEST(CharLogFormatTest, Unprintable) { absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected); - const TypeParam value = 0xeeu; + constexpr auto value = static_cast(0xeeu); auto comparison_stream = ComparisonStream(); comparison_stream << value; -- cgit v1.2.3