summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Phil Bennett <philipjbennett@users.noreply.github.com>2013-03-06 13:46:27 +0000
committer Phil Bennett <philipjbennett@users.noreply.github.com>2013-03-06 13:46:27 +0000
commit8928e5d768b4c5e317f47cd5d4c707987d0aa77e (patch)
tree9328bb0152a5026c26ea404298beaf8ab66d932a
parentfe5b7b2b961f194af3314acf9343698637bfea2b (diff)
Clang warning fixes: (nw)
src/mame/video/atarimo.c:584:10: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/emu/cpu/tms34010/34010gfx.c:1518:14: warning: shift count >=width of type [-Wshift-count-overflow] (etc)
-rw-r--r--src/emu/cpu/tms34010/34010gfx.c6
-rw-r--r--src/mame/video/atarimo.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/emu/cpu/tms34010/34010gfx.c b/src/emu/cpu/tms34010/34010gfx.c
index 214acecf5ac..b72ff5f63ea 100644
--- a/src/emu/cpu/tms34010/34010gfx.c
+++ b/src/emu/cpu/tms34010/34010gfx.c
@@ -1460,7 +1460,8 @@ if ((daddr & (BITS_PER_PIXEL - 1)) != 0) mame_printf_debug("PIXBLT_R%d with odd
for (y = 0; y < dy; y++)
{
int left_partials, right_partials, full_words, bitshift, bitshift_alt;
- UINT16 srcword, srcmask, dstword, dstmask, pixel;
+ UINT16 srcword, dstword, pixel;
+ UINT32 srcmask, dstmask;
UINT32 swordaddr, dwordaddr;
/* determine the bit shift to get from source to dest */
@@ -1719,7 +1720,8 @@ static void FUNCTION_NAME(pixblt_b)(tms34010_state *tms, int dst_is_linear)
/* loop over rows */
for (y = 0; y < dy; y++)
{
- UINT16 srcword, srcmask, dstword, dstmask, pixel;
+ UINT16 srcword, dstword, pixel;
+ UINT32 srcmask, dstmask;
UINT32 swordaddr, dwordaddr;
/* use byte addresses each row */
diff --git a/src/mame/video/atarimo.c b/src/mame/video/atarimo.c
index 84deab9afe5..1ab6eb72a24 100644
--- a/src/mame/video/atarimo.c
+++ b/src/mame/video/atarimo.c
@@ -581,7 +581,7 @@ static void convert_dirty_grid_to_rects(atarimo_data *mo, const rectangle &clipr
/* initialize the rect list */
rectlist->numrects = 0;
rectlist->rect = mo->rectlist;
- rect = &mo->rectlist[-1];
+ rect = &rectlist->rect[-1];
/* loop over all grid rows that intersect our cliprect */
for (y = sy; y <= ey; y++)