[gdb] Fix -Wstrict-null-sentinel warnings
When passed in CXXFLAGS, -Wstrict-null-sentinel triggers twice in a gdb/gdbserver build. Fix the two occurrences. Build and reg-tested on x86_64-linux. gdb/ChangeLog: 2020-02-10 Tom de Vries <tdevries@suse.de> * dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL sentinel to char *. gdbsupport/ChangeLog: 2020-02-10 Tom de Vries <tdevries@suse.de> * environ.c (gdb_environ::set): Cast concat NULL sentinel to char *.
This commit is contained in:
parent
44f6938ead
commit
85f0dd3ce8
4 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2020-02-10 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* dwarf2/read.c (process_psymtab_comp_unit_reader): Cast concat NULL
|
||||||
|
sentinel to char *.
|
||||||
|
|
||||||
2020-02-09 Tom de Vries <tdevries@suse.de>
|
2020-02-09 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
* dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
|
* dwarf2read.c (process_psymtab_comp_unit_reader): Append CU offset to
|
||||||
|
|
|
@ -7260,7 +7260,8 @@ process_psymtab_comp_unit_reader (const struct die_reader_specs *reader,
|
||||||
else if (strcmp (filename, artificial) == 0)
|
else if (strcmp (filename, artificial) == 0)
|
||||||
{
|
{
|
||||||
debug_filename.reset (concat (artificial, "@",
|
debug_filename.reset (concat (artificial, "@",
|
||||||
sect_offset_str (per_cu->sect_off), NULL));
|
sect_offset_str (per_cu->sect_off),
|
||||||
|
(char *) NULL));
|
||||||
filename = debug_filename.get ();
|
filename = debug_filename.get ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2020-02-10 Tom de Vries <tdevries@suse.de>
|
||||||
|
|
||||||
|
* environ.c (gdb_environ::set): Cast concat NULL sentinel to char *.
|
||||||
|
|
||||||
2020-01-24 Christian Biesinger <cbiesinger@google.com>
|
2020-01-24 Christian Biesinger <cbiesinger@google.com>
|
||||||
|
|
||||||
* thread-pool.c (set_thread_name): Add an overload for the NetBSD
|
* thread-pool.c (set_thread_name): Add an overload for the NetBSD
|
||||||
|
|
|
@ -105,7 +105,7 @@ gdb_environ::get (const char *var) const
|
||||||
void
|
void
|
||||||
gdb_environ::set (const char *var, const char *value)
|
gdb_environ::set (const char *var, const char *value)
|
||||||
{
|
{
|
||||||
char *fullvar = concat (var, "=", value, NULL);
|
char *fullvar = concat (var, "=", value, (char *) NULL);
|
||||||
|
|
||||||
/* We have to unset the variable in the vector if it exists. */
|
/* We have to unset the variable in the vector if it exists. */
|
||||||
unset (var, false);
|
unset (var, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue