From 721108fd54d961e54afd4e4da2e9a29838389990 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 15 Jul 2020 02:20:48 -0400 Subject: [PATCH] fix NDEBUG breakage with new dwarf5 code These fields are only used when NDEBUG is not defined. We get build failures with the current code like: src/common/dwarf/dwarf2reader.h:181:12: error: private field 'string_buffer_length_' is not used [-Werror,-Wunused-private-field] uint64_t string_buffer_length_; Change-Id: I01d6e29d31d50e29ed3736e7197e70455724ae48 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2299022 Reviewed-by: Sterling Augustine --- src/common/dwarf/dwarf2reader.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/dwarf/dwarf2reader.h b/src/common/dwarf/dwarf2reader.h index 83cd6767..e405e3a7 100644 --- a/src/common/dwarf/dwarf2reader.h +++ b/src/common/dwarf/dwarf2reader.h @@ -178,9 +178,13 @@ class LineInfo { // Convenience pointers into .debug_str and .debug_line_str. These exactly // correspond to those in the compilation unit. const uint8_t* string_buffer_; +#ifndef NDEBUG uint64_t string_buffer_length_; +#endif const uint8_t* line_string_buffer_; +#ifndef NDEBUG uint64_t line_string_buffer_length_; +#endif const uint8_t* after_header_; };