diff options
author | Tom Tromey <tom@tromey.com> | 2021-07-05 11:44:54 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-07-05 11:54:03 -0600 |
commit | b6aeb717a8bdaa9cc348ec88a5fdf059e1337580 (patch) | |
tree | f518533f1671bde5ddc10dd9a2176965b45df233 | |
parent | 918172470430ea6fa082c941e6789add88331197 (diff) | |
download | binutils-b6aeb717a8bdaa9cc348ec88a5fdf059e1337580.zip binutils-b6aeb717a8bdaa9cc348ec88a5fdf059e1337580.tar.gz binutils-b6aeb717a8bdaa9cc348ec88a5fdf059e1337580.tar.bz2 |
Fix warning in symtab.c
The compiler gives this warning when building symtab.c:
../../binutils-gdb/gdb/symtab.c:4247:28: warning: 'to_match' may be used uninitialized in this function [-Wmaybe-uninitialized]
This patch fixes the warning by adding a gdb_assert_not_reached.
-rw-r--r-- | gdb/symtab.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 6a9c3dc..fa3f422 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -4242,6 +4242,8 @@ info_sources_filter::matches (const char *fullname) const case match_on::FULLNAME: to_match = fullname; break; + default: + gdb_assert_not_reached ("bad m_match_type"); } if (m_c_regexp->exec (to_match, 0, NULL, 0) != 0) |