diff options
author | Tom de Vries <tdevries@suse.de> | 2020-02-10 15:13:42 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-02-10 15:13:42 +0100 |
commit | 85f0dd3ce8b249638e00f9e43153b712705a3347 (patch) | |
tree | 547a4613f5a0a95c2bdd9ec0eadcdf082bf24906 /gdbsupport | |
parent | 44f6938ead9cfadecd705dbd30fa177fac1330ad (diff) | |
download | binutils-85f0dd3ce8b249638e00f9e43153b712705a3347.zip binutils-85f0dd3ce8b249638e00f9e43153b712705a3347.tar.gz binutils-85f0dd3ce8b249638e00f9e43153b712705a3347.tar.bz2 |
[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 *.
Diffstat (limited to 'gdbsupport')
-rw-r--r-- | gdbsupport/ChangeLog | 4 | ||||
-rw-r--r-- | gdbsupport/environ.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index 6ea2f2c..3225bef 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -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> * thread-pool.c (set_thread_name): Add an overload for the NetBSD diff --git a/gdbsupport/environ.c b/gdbsupport/environ.c index 55d0a74..32434ee 100644 --- a/gdbsupport/environ.c +++ b/gdbsupport/environ.c @@ -105,7 +105,7 @@ gdb_environ::get (const char *var) const void 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. */ unset (var, false); |