fix uninitialized field in ada-lang.c (struct match_data)
Field found_sym in add_nonlocal_symbols's struct match_data is used uninitialized. Rather than adding the initialization of this field (to zero), we set the entire structure to zero first, and then set the fields that need to be initialized to non-zero next. gdb/ChangeLog: * ada-lang.c (add_nonlocal_symbols): Initialize data to all zeros. Remove setting of data.arg_sym to NULL.
This commit is contained in:
parent
d6a0f6e0c7
commit
6475f2fe1c
2 changed files with 6 additions and 1 deletions
|
@ -4922,8 +4922,8 @@ add_nonlocal_symbols (struct obstack *obstackp, const char *name,
|
|||
struct objfile *objfile;
|
||||
struct match_data data;
|
||||
|
||||
memset (&data, 0, sizeof data);
|
||||
data.obstackp = obstackp;
|
||||
data.arg_sym = NULL;
|
||||
|
||||
ALL_OBJFILES (objfile)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue