Avoid some warnings.
This commit is contained in:
parent
959aaebede
commit
abc71baaa6
@ -89,7 +89,8 @@ compress_lzma$(objext) : CXXFLAGS += -Wno-cast-qual
|
||||
compress_lzma$(objext) : CXXFLAGS += -Wno-non-virtual-dtor
|
||||
compress_lzma$(objext) : CXXFLAGS += -Wno-shadow
|
||||
compress_lzma$(objext) : CXXFLAGS += -Wno-unused
|
||||
##compress_lzma$(objext) : CXXFLAGS += -Wno-error
|
||||
# needed for gcc-4.3:
|
||||
compress_lzma$(objext) : CXXFLAGS += -Wno-error
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@ -542,10 +542,12 @@ void PackArmPe::pack(OutputFile *fo)
|
||||
else if (opt->win32_pe.strip_relocs < 0)
|
||||
opt->win32_pe.strip_relocs = (ih.imagebase >= 0x10000);
|
||||
if (opt->win32_pe.strip_relocs)
|
||||
{
|
||||
if (ih.imagebase < 0x10000)
|
||||
throwCantPack("--strip-relocs is not allowed when imagebase < 0x10000");
|
||||
else
|
||||
ih.flags |= RELOCS_STRIPPED;
|
||||
}
|
||||
|
||||
if (memcmp(isection[0].name,"UPX",3) == 0)
|
||||
throwAlreadyPackedByUPX();
|
||||
|
||||
@ -256,8 +256,9 @@ bool PackPs1::canPack()
|
||||
fi->readx(buf, sizeof(buf));
|
||||
checkAlreadyPacked(buf, sizeof(buf));
|
||||
|
||||
for (unsigned i = 0; i < sizeof(buf); i++)
|
||||
for (size_t i = 0; i < sizeof(buf); i++)
|
||||
if (buf[i] != 0)
|
||||
{
|
||||
if (!opt->force)
|
||||
throwCantPack("unknown data in header (try --force)");
|
||||
else
|
||||
@ -267,6 +268,7 @@ bool PackPs1::canPack()
|
||||
opt->backup = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!checkFileHeader())
|
||||
throwCantPack("unsupported header flags (try --force)");
|
||||
if (!opt->force && file_size < PS_MIN_SIZE)
|
||||
@ -320,7 +322,7 @@ void PackPs1::buildLoader(const Filter *)
|
||||
sa_tmp += overlap = ALIGN_UP((ph.overlap_overhead - sa_tmp), 4u);
|
||||
}
|
||||
|
||||
if (isCon || !isCon && M_IS_LZMA(ph.method))
|
||||
if (isCon || M_IS_LZMA(ph.method))
|
||||
foundBss = findBssSection();
|
||||
|
||||
if (M_IS_LZMA(ph.method) && !buildPart2)
|
||||
@ -574,11 +576,13 @@ void PackPs1::pack(OutputFile *fo)
|
||||
linker->defineSymbol("ldr_sz", M_IS_LZMA(ph.method) ? sz_lunc + 16 : (d_len-pad_code));
|
||||
|
||||
if (foundBss)
|
||||
{
|
||||
if (M_IS_LZMA(ph.method))
|
||||
linker->defineSymbol("wrkmem", bss_end - 160 - getDecompressorWrkmemSize()
|
||||
- (sz_lunc + 16));
|
||||
else
|
||||
linker->defineSymbol("wrkmem", bss_end - 16 - (d_len - pad_code));
|
||||
}
|
||||
|
||||
|
||||
const unsigned entry = comp_data_start - e_len;
|
||||
|
||||
@ -629,10 +629,12 @@ void PackW32Pe::pack(OutputFile *fo)
|
||||
else if (opt->win32_pe.strip_relocs < 0)
|
||||
opt->win32_pe.strip_relocs = (ih.imagebase >= 0x400000);
|
||||
if (opt->win32_pe.strip_relocs)
|
||||
{
|
||||
if (ih.imagebase < 0x400000)
|
||||
throwCantPack("--strip-relocs is not allowed when imagebase < 0x400000");
|
||||
else
|
||||
ih.flags |= RELOCS_STRIPPED;
|
||||
}
|
||||
|
||||
if (memcmp(isection[0].name,"UPX",3) == 0)
|
||||
throwAlreadyPackedByUPX();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user