Mercurial > repos > blastem
changeset 755:7306b3967c51
Cleanup some warnings under clang through a combination of code fixes and supressing specific warnings
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 27 Jun 2015 12:17:18 -0700 |
parents | cfa402c6ced8 |
children | e1dc98f7ed9f |
files | Makefile gen_x86.c z80_to_x86.c |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Sat Jun 27 11:39:55 2015 -0700 +++ b/Makefile Sat Jun 27 12:17:18 2015 -0700 @@ -25,10 +25,10 @@ endif #Darwin ifdef DEBUG -CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS)) else -CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration +CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS)) endif #DEBUG endif #Windows
--- a/gen_x86.c Sat Jun 27 11:39:55 2015 -0700 +++ b/gen_x86.c Sat Jun 27 12:17:18 2015 -0700 @@ -2018,7 +2018,7 @@ disp >>= 8; *(out++) = disp; } else { - mov_ir(code, fun, RAX, SZ_PTR); + mov_ir(code, (int64_t)fun, RAX, SZ_PTR); call_r(code, RAX); } code->cur = out; @@ -2228,7 +2228,7 @@ if (*code & REX_QUAD) { op_size = SZ_Q; } - } else if(*code == PRE_2BYTE || PRE_XOP) { + } else if(*code == PRE_2BYTE || *code == PRE_XOP) { prefix = *code; } else { main_op = *code;
--- a/z80_to_x86.c Sat Jun 27 11:39:55 2015 -0700 +++ b/z80_to_x86.c Sat Jun 27 12:17:18 2015 -0700 @@ -1951,7 +1951,7 @@ uint8_t * z80_interp_handler(uint8_t opcode, z80_context * context) { if (!context->interp_code[opcode]) { - if (opcode == 0xCB || (opcode >= 0xDD && opcode & 0xF == 0xD)) { + if (opcode == 0xCB || (opcode >= 0xDD && (opcode & 0xF) == 0xD)) { fprintf(stderr, "Encountered prefix byte %X at address %X. Z80 interpeter doesn't support those yet.", opcode, context->pc); exit(1); }