diff options
Diffstat (limited to 'src/patchelf.cc')
-rw-r--r-- | src/patchelf.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc index e91e2ab..1a67158 100644 --- a/src/patchelf.cc +++ b/src/patchelf.cc @@ -104,7 +104,7 @@ static std::string downcase(std::string s) why... */ template<ElfFileParams> template<class I> -I ElfFile<ElfFileParamNames>::rdi(I i) const +constexpr I ElfFile<ElfFileParamNames>::rdi(I i) const noexcept { I r = 0; if (littleEndian) { @@ -131,7 +131,7 @@ static void debug(const char * format, ...) } -void fmt2(std::ostringstream & out) +static void fmt2([[maybe_unused]] std::ostringstream & out) { } @@ -309,7 +309,7 @@ ElfFile<ElfFileParamNames>::ElfFile(FileContents fContents) template<ElfFileParams> -unsigned int ElfFile<ElfFileParamNames>::getPageSize() const +unsigned int ElfFile<ElfFileParamNames>::getPageSize() const noexcept { if (forcedPageSize > 0) return forcedPageSize; @@ -555,7 +555,7 @@ std::optional<std::reference_wrapper<Elf_Shdr>> ElfFile<ElfFileParamNames>::tryF template<ElfFileParams> -unsigned int ElfFile<ElfFileParamNames>::getSectionIndex(const SectionName & sectionName) +unsigned int ElfFile<ElfFileParamNames>::getSectionIndex(const SectionName & sectionName) const { for (unsigned int i = 1; i < rdi(hdr()->e_shnum); ++i) if (getSectionName(shdrs.at(i)) == sectionName) return i; |