mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
PR28417, std::string no longer allows accepting nullptr_t
PR 28417 * incremental.cc (Sized_relobj_incr::do_section_name): Avoid std:string undefined behaviour. * options.h (Search_directory::Search_directory): Likewise.
This commit is contained in:
parent
c7fdac09d9
commit
068a039b8b
@ -2286,7 +2286,7 @@ Sized_relobj_incr<size, big_endian>::do_section_name(unsigned int shndx) const
|
||||
const Output_sections& out_sections(this->output_sections());
|
||||
const Output_section* os = out_sections[shndx];
|
||||
if (os == NULL)
|
||||
return NULL;
|
||||
return std::string();
|
||||
return os->name();
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ class Search_directory
|
||||
// We need a default constructor because we put this in a
|
||||
// std::vector.
|
||||
Search_directory()
|
||||
: name_(NULL), put_in_sysroot_(false), is_in_sysroot_(false)
|
||||
: name_(), put_in_sysroot_(false), is_in_sysroot_(false)
|
||||
{ }
|
||||
|
||||
// This is the usual constructor.
|
||||
|
Loading…
Reference in New Issue
Block a user