forked from Imagelibrary/binutils-gdb
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.
gdb/ChangeLog:
* gdb/symtab.c (info_sources_filter::matches): Add default
case hander in switch statement.
(cherry picked from commit b6aeb717a8)
This commit is contained in:
committed by
Joel Brobecker
parent
5496271fd4
commit
2814ff8388
@@ -1,3 +1,9 @@
|
|||||||
|
2021-07-11 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
Committed by Joel Brobecker <brobecker@adacore.com>:
|
||||||
|
* gdb/symtab.c (info_sources_filter::matches): Add default
|
||||||
|
case hander in switch statement.
|
||||||
|
|
||||||
2021-07-08 Simon Marchi <simon.marchi@polymtl.ca>
|
2021-07-08 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* s390-linux-tdep.c (s390_linux_init_abi_any): Pass 1 (number
|
* s390-linux-tdep.c (s390_linux_init_abi_any): Pass 1 (number
|
||||||
|
|||||||
@@ -4242,6 +4242,8 @@ info_sources_filter::matches (const char *fullname) const
|
|||||||
case match_on::FULLNAME:
|
case match_on::FULLNAME:
|
||||||
to_match = fullname;
|
to_match = fullname;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
gdb_assert_not_reached ("bad m_match_type");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
|
if (m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user