Silence warnings.

This commit is contained in:
Christian Speckner 2024-08-08 21:57:14 +02:00
parent 65bc5270b0
commit 948ad8d67e
1 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ ElfLinker::RelocatedSymbol ElfLinker::findRelocatedSymbol(string_view name) cons
if (!myRelocatedSymbols[i])
ElfSymbolResolutionError::raise("symbol could not be relocated");
return *myRelocatedSymbols[i]; // FIXME: bugprone-unchecked-optional-access
return myRelocatedSymbols[i].value();
}
ElfSymbolResolutionError::raise("symbol not found");
@ -408,7 +408,7 @@ void ElfLinker::copyInitArrays(vector<uInt32>& initArray, const std::unordered_m
void ElfLinker::applyRelocationToSection(const ElfFile::Relocation& relocation, size_t iSection)
{
const auto& targetSection = myElf.getSections()[iSection];
const auto& targetSectionRelocated = *myRelocatedSections[iSection]; // FIXME: bugprone-unchecked-optional-access
const auto& targetSectionRelocated = myRelocatedSections[iSection].value();
const auto& symbol = myElf.getSymbols()[relocation.symbol];
const auto& relocatedSymbol = myRelocatedSymbols[relocation.symbol];