From 3b3469e9ed0de3d02e4450b9b95014a4266cf2ff Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Wed, 20 Jan 2021 12:07:19 -0800 Subject: [PATCH] breakpad: Eliminate 'unused variable' warnings. When built with -Werror, dwar2reader.cc fails to build with three -Wunused-variable warnings. This CL fixes that. Change-Id: I10487644377d623d850acc258a94bbacb368ffae Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2638927 Reviewed-by: Sterling Augustine Reviewed-by: Joshua Peraza --- src/common/dwarf/dwarf2reader.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/dwarf/dwarf2reader.cc b/src/common/dwarf/dwarf2reader.cc index 0f966612..1a9a451f 100644 --- a/src/common/dwarf/dwarf2reader.cc +++ b/src/common/dwarf/dwarf2reader.cc @@ -568,11 +568,11 @@ const uint8_t* CompilationUnit::ProcessStrOffsetBaseAttribute( return start + datalen + len; } case DW_FORM_strp: { - const uint64_t offset = reader_->ReadOffset(start); + reader_->ReadOffset(start); return start + reader_->OffsetSize(); } case DW_FORM_line_strp: { - const uint64_t offset = reader_->ReadOffset(start); + reader_->ReadOffset(start); return start + reader_->OffsetSize(); } case DW_FORM_strp_sup: @@ -586,7 +586,7 @@ const uint8_t* CompilationUnit::ProcessStrOffsetBaseAttribute( return start + len; case DW_FORM_strx: case DW_FORM_GNU_str_index: { - uint64_t str_index = reader_->ReadUnsignedLEB128(start, &len); + reader_->ReadUnsignedLEB128(start, &len); return start + len; } case DW_FORM_strx1: {