summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2020-09-17 08:31:00 +0200
committerRolf Eike Beer <eb@emlix.com>2021-03-16 08:26:27 +0100
commit4967cdcd0ea09df373bbce2e24e87cfbe87248c5 (patch)
treef1eb803fb694045d7b5c16c72434de856a6392f1
parent0fcf2789533747c7cb0923aed42b7c50e35123ae (diff)
downloadpatchelf-4967cdcd0ea09df373bbce2e24e87cfbe87248c5.tar.gz
fix -Wshadow warnings
-rw-r--r--src/patchelf.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/patchelf.cc b/src/patchelf.cc
index 5b6b861..c8ce4f6 100644
--- a/src/patchelf.cc
+++ b/src/patchelf.cc
@@ -380,8 +380,8 @@ static void checkPointer(const FileContents & contents, void * p, unsigned int s
template<ElfFileParams>
-ElfFile<ElfFileParamNames>::ElfFile(FileContents fileContents)
- : fileContents(fileContents)
+ElfFile<ElfFileParamNames>::ElfFile(FileContents fContents)
+ : fileContents(fContents)
, contents(fileContents->data())
{
/* Check the ELF header for basic validity. */
@@ -799,8 +799,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
/* Compute the total space needed for the replaced sections */
off_t neededSpace = 0;
- for (auto & i : replacedSections)
- neededSpace += roundUp(i.second.size(), sectionAlignment);
+ for (auto & s : replacedSections)
+ neededSpace += roundUp(s.second.size(), sectionAlignment);
debug("needed space is %d\n", neededSpace);
Elf_Off startOffset = roundUp(fileContents->size(), getPageSize());
@@ -1369,7 +1369,7 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
return;
}
- auto dyn = (Elf_Dyn *)(contents + rdi(shdrDynamic.sh_offset));
+ dyn = (Elf_Dyn *)(contents + rdi(shdrDynamic.sh_offset));
Elf_Dyn * last = dyn;
for ( ; rdi(dyn->d_tag) != DT_NULL; dyn++) {
if (rdi(dyn->d_tag) == DT_RPATH) {