diff options
author | Abseil Team <absl-team@google.com> | 2022-10-06 12:31:33 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-10-06 12:32:48 -0700 |
commit | 8317b9a01cbc32594ad4bf971709c97cb13ec921 (patch) | |
tree | b5b22d90392021f249d9b2659db2df0bfa82e03a /absl/log/log_format_test.cc | |
parent | 10e7b4b72d58bc1476a1dcc94a779b4804974256 (diff) | |
download | abseil-8317b9a01cbc32594ad4bf971709c97cb13ec921.tar.gz abseil-8317b9a01cbc32594ad4bf971709c97cb13ec921.tar.bz2 abseil-8317b9a01cbc32594ad4bf971709c97cb13ec921.zip |
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
Diffstat (limited to 'absl/log/log_format_test.cc')
-rw-r--r-- | absl/log/log_format_test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<TypeParam>(0xeeu); auto comparison_stream = ComparisonStream(); comparison_stream << value; |