From f563d6cc749f0577bfe3e01426d1eed670870d4c Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 25 Feb 2025 16:29:06 -0500 Subject: [PATCH] gdb/dwarf: initialize tu_stats fields Initialize fields of tu_stats to 0, remove the explicit default initialization of dwarf2_per_bfd::tu_stats. Change-Id: I98b2d5c4171291a3df2569466559174fb7cf32b6 Approved-By: Tom Tromey --- gdb/dwarf2/read.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 0938dacc73c..a7313a6e8ca 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -38,12 +38,12 @@ extern struct cmd_list_element *show_dwarf_cmdlist; struct tu_stats { - int nr_uniq_abbrev_tables; - int nr_symtabs; - int nr_symtab_sharers; - int nr_stmt_less_type_units; - int nr_all_type_units_reallocs; - int nr_tus; + int nr_uniq_abbrev_tables = 0; + int nr_symtabs = 0; + int nr_symtab_sharers = 0; + int nr_stmt_less_type_units = 0; + int nr_all_type_units_reallocs = 0; + int nr_tus = 0; }; struct dwarf2_cu; @@ -529,7 +529,7 @@ public: /* Type unit statistics, to see how well the scaling improvements are doing. */ - struct tu_stats tu_stats {}; + struct tu_stats tu_stats; /* A table mapping DW_AT_dwo_name values to struct dwo_file objects. This is NULL if the table hasn't been allocated yet. */ -- 2.47.2