Picky, picky static analyzer

https://github.com/upx/upx/actions/runs/4422867763/jobs/7755057541
	modified:   p_lx_elf.cpp
This commit is contained in:
John Reiser 2023-03-15 09:05:02 -07:00
parent 35333403ef
commit b74c4e4ac1
1 changed files with 2 additions and 1 deletions

View File

@ -1370,6 +1370,7 @@ PackLinuxElf32::buildLinuxLoader(
len += snprintf(&sec[len], sizeof(sec) - len, ",%s", "LZMA_ELF00,LZMA_DEC20,LZMA_DEC30");
}
len += snprintf(&sec[len], sizeof(sec) - len, ",%s", "EXP_TAIL,SO_TAIL,SO_MAIN");
(void)len; // Pacify the anal-retentive static analyzer which hates a good idiom.
addLoader(sec, nullptr);
relocateLoader();
{
@ -6403,7 +6404,7 @@ void PackLinuxElf64::un_DT_INIT(
n_plt = 3+ (dt_pltrelsz / sizeof(Elf64_Rela)); // FIXME: "3+"
}; break;
case Elf64_Dyn::DT_PLTGOT: { plt_va = dt_pltgot = val;}
case Elf64_Dyn::DT_PLTGOT: { plt_va = dt_pltgot = val; (void)dt_pltgot;}
// FALL THROUGH
case Elf64_Dyn::DT_PREINIT_ARRAY:
case Elf64_Dyn::DT_INIT_ARRAY: