Remove usage of sprintf in dwarf_cfi_to_module.

sprintf is marked as deprecated with Xcode 14.

Bug: 1331345
Change-Id: Ic301134ec0c5e7b9ee9d590ab1423491aad5ccf7
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3692036
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Justin Cohen 2022-06-08 13:37:42 -04:00 committed by Ivan Penkov
parent 0f1f43edd2
commit 82b16055af

View file

@ -184,9 +184,7 @@ string DwarfCFIToModule::RegisterName(int i) {
return register_names_[reg]; return register_names_[reg];
reporter_->UnnamedRegister(entry_offset_, reg); reporter_->UnnamedRegister(entry_offset_, reg);
char buf[30]; return string("unnamed_register") + std::to_string(reg);
sprintf(buf, "unnamed_register%u", reg);
return buf;
} }
void DwarfCFIToModule::Record(Module::Address address, int reg, void DwarfCFIToModule::Record(Module::Address address, int reg,