From 8847c300f19aa680019d6df30a94684a2f4767c1 Mon Sep 17 00:00:00 2001 From: Zeex Date: Sat, 30 Dec 2017 19:25:26 +0600 Subject: [PATCH] Fix compile warnings in pawndisasm --- .travis.yml | 2 +- source/amx/amxdbg.c | 4 ++-- source/compiler/pawndisasm.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f69ff44..72624af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/source/amx/amxdbg.c b/source/amx/amxdbg.c index 6e05e4a..69dff00 100644 --- a/source/amx/amxdbg.c +++ b/source/amx/amxdbg.c @@ -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; diff --git a/source/compiler/pawndisasm.c b/source/compiler/pawndisasm.c index e662a93..de0cbc3 100644 --- a/source/compiler/pawndisasm.c +++ b/source/compiler/pawndisasm.c @@ -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);