From 60edf9239d98396728c3ea85fd299f1dfe54256d Mon Sep 17 00:00:00 2001 From: feos Date: Tue, 7 Mar 2017 21:52:25 +0300 Subject: [PATCH] restore -Werror for everything but lua (can't nicely remove its "bad-function-cast everywhere possible" approach) avoid crash by casting astring to char * for mame_printf_info() --- mame-rr/makefile | 2 +- mame-rr/src/emu/mame.c | 2 +- mame-rr/src/lib/lib.mak | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mame-rr/makefile b/mame-rr/makefile index 66d95dc4..fd455f6f 100644 --- a/mame-rr/makefile +++ b/mame-rr/makefile @@ -454,7 +454,7 @@ CCOMFLAGS += -O$(OPTIMIZE) ifneq ($(OPTIMIZE),0) ifneq ($(TARGETOS),os2) ifndef NOWERROR -CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) +CCOMFLAGS += -Werror -fno-strict-aliasing $(ARCHOPTS) else CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS) endif diff --git a/mame-rr/src/emu/mame.c b/mame-rr/src/emu/mame.c index e9316f13..17812b6a 100644 --- a/mame-rr/src/emu/mame.c +++ b/mame-rr/src/emu/mame.c @@ -199,7 +199,7 @@ int mame_execute(core_options *options) // report rom name if (strlen(gamename) > 0) - mame_printf_info("\nROM name: %s\n", gamename); + mame_printf_info("\nROM name: %s\n", (char *)gamename); // run the machine error = machine->run(firstrun); diff --git a/mame-rr/src/lib/lib.mak b/mame-rr/src/lib/lib.mak index 5a7a5be8..04ae007a 100644 --- a/mame-rr/src/lib/lib.mak +++ b/mame-rr/src/lib/lib.mak @@ -117,7 +117,7 @@ $(OBJ)/liblua.a: $(LUAOBJS) $(LIBOBJ)/lua/%.o: $(LIBSRC)/lua/%.c | $(OSPREBUILD) @echo Compiling $<... - $(CC) $(CDEFS) $(CCOMFLAGS) $(CONLYFLAGS) -c $< -o $@ + $(CC) $(CDEFS) $(CCOMFLAGS) -Wno-error $(CONLYFLAGS) -c $< -o $@ #-------------------------------------------------