mirror of
https://github.com/NixOS/patchelf.git
synced 2025-10-23 00:58:24 +08:00
fix -Wshadow warnings
This commit is contained in:
@@ -380,8 +380,8 @@ static void checkPointer(const FileContents & contents, void * p, unsigned int s
|
|||||||
|
|
||||||
|
|
||||||
template<ElfFileParams>
|
template<ElfFileParams>
|
||||||
ElfFile<ElfFileParamNames>::ElfFile(FileContents fileContents)
|
ElfFile<ElfFileParamNames>::ElfFile(FileContents fContents)
|
||||||
: fileContents(fileContents)
|
: fileContents(fContents)
|
||||||
, contents(fileContents->data())
|
, contents(fileContents->data())
|
||||||
{
|
{
|
||||||
/* Check the ELF header for basic validity. */
|
/* Check the ELF header for basic validity. */
|
||||||
@@ -799,8 +799,8 @@ void ElfFile<ElfFileParamNames>::rewriteSectionsLibrary()
|
|||||||
|
|
||||||
/* Compute the total space needed for the replaced sections */
|
/* Compute the total space needed for the replaced sections */
|
||||||
off_t neededSpace = 0;
|
off_t neededSpace = 0;
|
||||||
for (auto & i : replacedSections)
|
for (auto & s : replacedSections)
|
||||||
neededSpace += roundUp(i.second.size(), sectionAlignment);
|
neededSpace += roundUp(s.second.size(), sectionAlignment);
|
||||||
debug("needed space is %d\n", neededSpace);
|
debug("needed space is %d\n", neededSpace);
|
||||||
|
|
||||||
Elf_Off startOffset = roundUp(fileContents->size(), getPageSize());
|
Elf_Off startOffset = roundUp(fileContents->size(), getPageSize());
|
||||||
@@ -1369,7 +1369,7 @@ void ElfFile<ElfFileParamNames>::modifyRPath(RPathOp op,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto dyn = (Elf_Dyn *)(contents + rdi(shdrDynamic.sh_offset));
|
dyn = (Elf_Dyn *)(contents + rdi(shdrDynamic.sh_offset));
|
||||||
Elf_Dyn * last = dyn;
|
Elf_Dyn * last = dyn;
|
||||||
for ( ; rdi(dyn->d_tag) != DT_NULL; dyn++) {
|
for ( ; rdi(dyn->d_tag) != DT_NULL; dyn++) {
|
||||||
if (rdi(dyn->d_tag) == DT_RPATH) {
|
if (rdi(dyn->d_tag) == DT_RPATH) {
|
||||||
|
Reference in New Issue
Block a user