From 70e0f9215346ea62e89dd4ff7ffdfdd948858403 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 16 Feb 2023 14:59:46 -0500 Subject: [PATCH] Fix StringPiece compile issue in Chromium. Change-Id: I5a29f690a4512252d0d5730492f7fd4cec16ffaa Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4262547 Commit-Queue: Justin Cohen Reviewed-by: Mark Mentovai --- client/ring_buffer_annotation_load_test_main.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/ring_buffer_annotation_load_test_main.cc b/client/ring_buffer_annotation_load_test_main.cc index 12355f4b..96ed25e0 100644 --- a/client/ring_buffer_annotation_load_test_main.cc +++ b/client/ring_buffer_annotation_load_test_main.cc @@ -316,8 +316,10 @@ class RingBufferAnnotationSnapshot final { base::StringPiece str(reinterpret_cast(&bytes[0]), bytes.size()); if (!HexStringToInt(str, &next_value)) { - fprintf( - stderr, "Couldn't parse value: [%s]\n", str.as_string().c_str()); + fprintf(stderr, + "Couldn't parse value: [%.*s]\n", + base::checked_cast(bytes.size()), + bytes.data()); abort(); } if (value == std::numeric_limits::max()) {