fixed -Wunused-local-typedefs warnings with ATTR_UNUSED and enabled it again (nw)

This commit is contained in:
Oliver Stöneberg 2015-02-05 16:41:05 +01:00
parent a4c8ca2c25
commit 56f03a8f8f
3 changed files with 8 additions and 10 deletions

View File

@ -62,8 +62,6 @@ endif
ifeq ($(findstring 3.6,$(TEST_CLANG)),3.6)
CCOMFLAGS += -Wno-inline-new-delete
# caused by macros in src/emu/addrmap.h
CCOMFLAGS += -Wno-unused-local-typedef
# caused by src/mess/drivers/x07.c, src/osd/sdl/window.c, src/emu/sound/disc_mth.inc, src/mame/video/chihiro.c
CCOMFLAGS += -Wno-absolute-value

View File

@ -10,13 +10,13 @@ ifeq ($(findstring 4.7.,$(TEST_GCC)),4.7.)
endif
ifeq ($(findstring 4.8.,$(TEST_GCC)),4.8.)
CCOMFLAGS += -Wno-narrowing -Wno-attributes -Wno-unused-local-typedefs
CCOMFLAGS += -Wno-narrowing -Wno-attributes
# array bounds checking seems to be buggy in 4.8.1 (try it on video/stvvdp1.c and video/model1.c without -Wno-array-bounds)
CCOMFLAGS += -Wno-unused-variable -Wno-array-bounds
endif
ifeq ($(findstring 4.9.,$(TEST_GCC)),4.9.)
CCOMFLAGS += -Wno-narrowing -Wno-attributes -Wno-unused-local-typedefs
CCOMFLAGS += -Wno-narrowing -Wno-attributes
CCOMFLAGS += -Wno-array-bounds
endif

View File

@ -305,21 +305,21 @@ public:
#define ADDRESS_MAP_START(_name, _space, _bits, _class) \
void ADDRESS_MAP_NAME(_name)(address_map &map, device_t &device) \
{ \
typedef read##_bits##_delegate read_delegate; \
typedef write##_bits##_delegate write_delegate; \
typedef read##_bits##_delegate read_delegate ATTR_UNUSED; \
typedef write##_bits##_delegate write_delegate ATTR_UNUSED; \
address_map_entry##_bits *curentry = NULL; \
(void)curentry; \
map.configure(_space, _bits); \
typedef _class drivdata_class;
typedef _class drivdata_class ATTR_UNUSED;
#define DEVICE_ADDRESS_MAP_START(_name, _bits, _class) \
void _class :: _name(::address_map &map, device_t &device) \
{ \
typedef read##_bits##_delegate read_delegate; \
typedef write##_bits##_delegate write_delegate; \
typedef read##_bits##_delegate read_delegate ATTR_UNUSED; \
typedef write##_bits##_delegate write_delegate ATTR_UNUSED; \
address_map_entry##_bits *curentry = NULL; \
(void)curentry; \
map.configure(AS_PROGRAM, _bits); \
typedef _class drivdata_class;
typedef _class drivdata_class ATTR_UNUSED;
#define ADDRESS_MAP_END \
}