"properly fixed" clang -Wconstant-logical-operand warnings and enabled it (nw)

This commit is contained in:
Oliver Stöneberg 2014-09-23 10:13:12 +00:00
parent d05fb42842
commit 0cf86be9a7
4 changed files with 8 additions and 13 deletions

View File

@ -9,9 +9,6 @@ CCOMFLAGS += -Wno-self-assign-field
# caused by src/emu/cpu/tms34010/34010gfx.c
CCOMFLAGS += -Wno-shift-count-overflow
# caused by src/emu/video/stvvdp2.c
CCOMFLAGS += -Wno-constant-logical-operand
# TODO: needs to use $(CC)
TEST_CLANG := $(shell clang --version)

View File

@ -298,7 +298,7 @@ void h8_timer16_channel_device::recalc_event(UINT64 cur_time)
else
event_time = 0;
if(LOG_EVENT_TIME && event_time)
if(event_time && LOG_EVENT_TIME)
logerror("%s: next event in %d cycles (%ld)\n", tag(), int(event_time - cpu->total_cycles()), long(event_time));
} else {

View File

@ -2,6 +2,7 @@
#define DEBUG_MODE 0
#define TEST_FUNCTIONS 0
#define POPMESSAGE_DEBUG 0
/*
@ -4431,13 +4432,13 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
// popmessage("Sprite Window enabled");
/* Capcom Collection Dai 2 - Choh Makaimura (Duh!) */
if(STV_VDP2_MZCTL & 0x1f && 0)
if(STV_VDP2_MZCTL & 0x1f && POPMESSAGE_DEBUG)
popmessage("Mosaic control enabled = %04x\n",STV_VDP2_MZCTL);
/* Bio Hazard bit 1 */
/* Airs Adventure 0x3e */
/* Bakuretsu Hunter */
if(STV_VDP2_LNCLEN & ~2 && 0)
if(STV_VDP2_LNCLEN & ~2 && POPMESSAGE_DEBUG)
popmessage("Line Colour screen enabled %04x %08x, contact MAMEdev",STV_VDP2_LNCLEN,STV_VDP2_LCTAU<<16|STV_VDP2_LCTAL);
/* Bio Hazard 0x400 = extended color calculation enabled */
@ -4448,7 +4449,7 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
popmessage("Gradation enabled %04x, contact MAMEdev",STV_VDP2_CCCR);
/* Advanced VG, Shining Force III */
if(STV_VDP2_SFCCMD && 0)
if(STV_VDP2_SFCCMD && POPMESSAGE_DEBUG)
popmessage("Special Color Calculation enable %04x, contact MAMEdev",STV_VDP2_SFCCMD);
/* Cleopatra Fortune Transparent Shadow */
@ -4470,7 +4471,7 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
popmessage("Reduction enable %04x, contact MAMEdev",STV_VDP2_ZMCTL);
/* Burning Rangers and friends FMV, J.League Pro Soccer Club Wo Tsukurou!! backgrounds */
if(STV_VDP2_SCRCTL & 0x0101 && 0)
if(STV_VDP2_SCRCTL & 0x0101 && POPMESSAGE_DEBUG)
popmessage("Vertical cell scroll enable %04x, contact MAMEdev",STV_VDP2_SCRCTL);
/* Magical Drop III 0x200 -> color calculation window */

View File

@ -344,11 +344,8 @@ void jaguar_state::FUNCNAME(UINT32 command, UINT32 a1flags, UINT32 a2flags)
}
/* check for unhandled command bits */
if (LOG_UNHANDLED_BLITS)
{
if (COMMAND & 0x24003000)
logerror("Blitter unhandled: these command bits: %08X\n", COMMAND & 0x24003000);
}
if ((COMMAND & 0x24003000) && LOG_UNHANDLED_BLITS)
logerror("Blitter unhandled: these command bits: %08X\n", COMMAND & 0x24003000);
/* top of the outer loop */
outer = outer_count;