Fix compile warnings in pawndisasm

This commit is contained in:
Zeex 2017-12-30 19:25:26 +06:00
parent 8fe5558d7e
commit 8847c300f1
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ addons:
before_script:
- cmake source/compiler -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_FLAGS="-m32 -Werror"
-DCMAKE_C_FLAGS="-m32 -Werror -Wno-address-of-packed-member"
-DCPACK_GENERATOR="TGZ;ZIP"
script:

View File

@ -578,8 +578,8 @@ int AMXAPI dbg_GetVariable(AMX_DBG *amxdbg, const char *symname, ucell scopeaddr
break;
/* check the range, keep a pointer to the symbol with the smallest range */
if (strcmp(amxdbg->symboltbl[index]->name, symname) == 0
&& (codestart == 0 && codeend == 0
|| amxdbg->symboltbl[index]->codestart >= codestart && amxdbg->symboltbl[index]->codeend <= codeend))
&& ((codestart == 0 && codeend == 0)
|| (amxdbg->symboltbl[index]->codestart >= codestart && amxdbg->symboltbl[index]->codeend <= codeend)))
{
*sym = amxdbg->symboltbl[index];
codestart = amxdbg->symboltbl[index]->codestart;

View File

@ -579,7 +579,7 @@ int main(int argc,char *argv[])
fprintf(fplist," %s",name);
name[0]='\0';
} /* if */
fprintf(fplist,"\n%08"PRIxC" ",(cell)(cip-code)*sizeof(cell)-(amxhdr.dat-amxhdr.cod));
fprintf(fplist,"\n%08"PRIxC" ",(cell)((cip-code)*sizeof(cell)-(amxhdr.dat-amxhdr.cod)));
} /* if */
fprintf(fplist,"%08"PRIxC" ",*cip);
addchars(name,*cip,count);