Fixed some warnings from Cppcheck.

This commit is contained in:
orbitcowboy 2019-05-27 08:41:10 +02:00 committed by Serge Lamikhov-Center
parent 15cd4b1bf2
commit 010ef79cd0
2 changed files with 4 additions and 4 deletions

View File

@ -74,7 +74,7 @@ checkSection( const section* sec,
////////////////////////////////////////////////////////////////////////////////
void
checkSection( const section* sec,
std::string name,
const std::string &name,
Elf_Word type,
Elf_Xword flags,
Elf64_Addr address,

View File

@ -35,11 +35,11 @@ int main( int, char* argv[] )
if ( 0 < nNum ) {
std::printf( "\nSection name: %s\n", pSec->GetName().c_str() );
std::printf( " Num Type Offset Addend Calc SymValue SymName\n" );
for ( Elf_Xword i = 0; i < nNum; ++i ) {
pRel->GetEntry( i, offset, symbolValue, symbolName,
for ( Elf_Xword j = 0; j < nNum; ++j ) {
pRel->GetEntry( j, offset, symbolValue, symbolName,
type, addend, calcValue );
std::printf( "[%4llx] %02x %08llx %08llx %08llx %08llx %s\n",
i, type, offset,
j, type, offset,
addend, calcValue,
symbolValue, symbolName.c_str() );
}