From 062528e4a5b81f020cb9038d3cffebc5d4d8d5be Mon Sep 17 00:00:00 2001 From: Wilbert Pol Date: Tue, 23 Sep 2014 19:24:20 +0000 Subject: [PATCH] 34010gfx.c: Work around clang shift overflow warnings; silly fix... (nw) --- src/build/flags_clang.mak | 3 --- src/emu/cpu/tms34010/34010gfx.c | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/build/flags_clang.mak b/src/build/flags_clang.mak index 1368bbf0032..cf0a13e6301 100644 --- a/src/build/flags_clang.mak +++ b/src/build/flags_clang.mak @@ -6,9 +6,6 @@ CCOMFLAGS += \ # caused by obj/sdl64d/emu/cpu/tms57002/tms57002.inc CCOMFLAGS += -Wno-self-assign-field -# caused by src/emu/cpu/tms34010/34010gfx.c -CCOMFLAGS += -Wno-shift-count-overflow - # TODO: needs to use $(CC) TEST_CLANG := $(shell clang --version) diff --git a/src/emu/cpu/tms34010/34010gfx.c b/src/emu/cpu/tms34010/34010gfx.c index 392847dba52..55efb96bb11 100644 --- a/src/emu/cpu/tms34010/34010gfx.c +++ b/src/emu/cpu/tms34010/34010gfx.c @@ -1428,10 +1428,10 @@ if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd d dstword = (dstword & ~dstmask) | pixel; /* update the source */ - srcmask >>= BITS_PER_PIXEL; + srcmask = srcmask >> BITS_PER_PIXEL; /* update the destination */ - dstmask >>= BITS_PER_PIXEL; + dstmask = dstmask >> BITS_PER_PIXEL; } /* write the result */ @@ -1470,10 +1470,10 @@ if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd d dstword = (dstword & ~dstmask) | pixel; /* update the source */ - srcmask >>= BITS_PER_PIXEL; + srcmask = srcmask >> BITS_PER_PIXEL; /* update the destination */ - dstmask >>= BITS_PER_PIXEL; + dstmask = dstmask >> BITS_PER_PIXEL; } /* write the result */ @@ -1508,10 +1508,10 @@ if ((daddr & (BITS_PER_PIXEL - 1)) != 0) osd_printf_debug("PIXBLT_R%d with odd d dstword = (dstword & ~dstmask) | pixel; /* update the source */ - srcmask >>= BITS_PER_PIXEL; + srcmask = srcmask >> BITS_PER_PIXEL; /* update the destination */ - dstmask >>= BITS_PER_PIXEL; + dstmask = dstmask >> BITS_PER_PIXEL; } /* write the result */ @@ -1669,7 +1669,7 @@ void FUNCTION_NAME(tms340x0_device::pixblt_b)(int dst_is_linear) } /* update the destination */ - dstmask <<= BITS_PER_PIXEL; + dstmask = dstmask << BITS_PER_PIXEL; } /* write the result */ @@ -1705,7 +1705,7 @@ void FUNCTION_NAME(tms340x0_device::pixblt_b)(int dst_is_linear) } /* update the destination */ - dstmask <<= BITS_PER_PIXEL; + dstmask = dstmask << BITS_PER_PIXEL; } /* write the result */ @@ -1738,7 +1738,7 @@ void FUNCTION_NAME(tms340x0_device::pixblt_b)(int dst_is_linear) } /* update the destination */ - dstmask <<= BITS_PER_PIXEL; + dstmask = dstmask << BITS_PER_PIXEL; } /* write the result */ @@ -1869,7 +1869,7 @@ void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear) dstword = (dstword & ~dstmask) | pixel; /* update the destination */ - dstmask <<= BITS_PER_PIXEL; + dstmask = dstmask << BITS_PER_PIXEL; } /* write the result */ @@ -1896,7 +1896,7 @@ void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear) dstword = (dstword & ~dstmask) | pixel; /* update the destination */ - dstmask <<= BITS_PER_PIXEL; + dstmask = dstmask << BITS_PER_PIXEL; } /* write the result */ @@ -1920,7 +1920,7 @@ void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear) dstword = (dstword & ~dstmask) | pixel; /* update the destination */ - dstmask <<= BITS_PER_PIXEL; + dstmask = dstmask << BITS_PER_PIXEL; } /* write the result */