aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/read.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-03-15 18:13:41 -0400
committerSimon Marchi <simon.marchi@efficios.com>2025-03-17 16:14:08 -0400
commit6fca4d9694bf6d10d1cc41aed8552fe90085eb09 (patch)
tree124548e579158904baa1a362ca1bf9e70c3c1b2a /gdb/dwarf2/read.c
parentdf3eb64a53c3589f4e930a89e08e2200e8627509 (diff)
downloadbinutils-6fca4d9694bf6d10d1cc41aed8552fe90085eb09.zip
binutils-6fca4d9694bf6d10d1cc41aed8552fe90085eb09.tar.gz
binutils-6fca4d9694bf6d10d1cc41aed8552fe90085eb09.tar.bz2
gdbsupport: add some -Wunused-* warning flags
Add a few -Wunused-* diagnostic flags that look useful. Some are known to gcc, some to clang, some to both. Fix the fallouts. -Wunused-const-variable=1 is understood by gcc, but not clang. -Wunused-const-variable would be undertsood by both, but for gcc at least it would flag the unused const variables in headers. This doesn't make sense to me, because as soon as one source file includes a header but doesn't use a const variable defined in that header, it's an error. With `=1`, gcc only warns about unused const variable in the main source file. It's not a big deal that clang doesn't understand it though: any instance of that problem will be flagged by any gcc build. Change-Id: Ie20d99524b3054693f1ac5b53115bb46c89a5156 Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r--gdb/dwarf2/read.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 85e4d59..fd178e9 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -3050,7 +3050,6 @@ cutu_reader::cutu_reader (dwarf2_per_cu *this_cu,
bool skip_partial,
enum language pretend_language,
const abbrev_table_cache *cache)
- : m_this_cu (this_cu)
{
struct objfile *objfile = per_objfile->objfile;
struct dwarf2_section_info *section = this_cu->section;
@@ -3279,7 +3278,6 @@ cutu_reader::cutu_reader (dwarf2_per_cu *this_cu,
enum language pretend_language,
struct dwarf2_cu *parent_cu,
struct dwo_file *dwo_file)
- : m_this_cu (this_cu)
{
struct objfile *objfile = per_objfile->objfile;
struct dwarf2_section_info *section = this_cu->section;
@@ -16192,9 +16190,6 @@ private:
/* Additional bits of state we need to track. */
- /* The last file that we called dwarf2_start_subfile for.
- This is only used for TLLs. */
- unsigned int m_last_file = 0;
/* The last file a line number was recorded for. */
struct subfile *m_last_subfile = NULL;