summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2021-02-14 03:16:12 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2021-02-14 03:16:12 +1100
commit5569db9be3a86ded3e56183c1561e2d5d5f7d035 (patch)
tree38957d549625ed4b0cb23fafcaba225d1c08cb86
parent5faba2b8134813f2bc233032963335772e6c3125 (diff)
audio rax: Coverity 315527
-rw-r--r--src/mame/audio/rax.cpp6
-rw-r--r--src/mame/video/psikyo.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mame/audio/rax.cpp b/src/mame/audio/rax.cpp
index 1255be6efa3..79c7a4bacea 100644
--- a/src/mame/audio/rax.cpp
+++ b/src/mame/audio/rax.cpp
@@ -408,10 +408,10 @@ void acclaim_rax_device::adsp_sound_tx_callback(offs_t offset, uint32_t data)
if (which != 0)
return;
- int autobuf_reg = which ? S1_AUTOBUF_REG : S0_AUTOBUF_REG;
+ int autobuf_reg = which ? S1_AUTOBUF_REG : S0_AUTOBUF_REG; // "which" must equal 0 here, invalid test: Coverity 315932
/* check if SPORT1 is enabled */
- if (m_control_regs[SYSCONTROL_REG] & (which ? 0x0800 : 0x1000)) /* bit 11 */
+ if (m_control_regs[SYSCONTROL_REG] & (which ? 0x0800 : 0x1000)) /* bit 11 */ // invalid test here too
{
/* we only support autobuffer here (which is what this thing uses), bail if not enabled */
if (m_control_regs[autobuf_reg] & 0x0002) /* bit 1 */
@@ -458,7 +458,7 @@ void acclaim_rax_device::adsp_sound_tx_callback(offs_t offset, uint32_t data)
void acclaim_rax_device::dmovlay_callback(uint32_t data)
{
- if (data < 0 || data > 1)
+ if (data > 1)
{
fatalerror("dmovlay_callback: Error! dmovlay called with value = %X\n", data);
}
diff --git a/src/mame/video/psikyo.cpp b/src/mame/video/psikyo.cpp
index adb01b282b0..c505c1680ce 100644
--- a/src/mame/video/psikyo.cpp
+++ b/src/mame/video/psikyo.cpp
@@ -515,7 +515,7 @@ u32 psikyo_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, con
m_tilemap[layer]->set_transparent_pen((layer_ctrl[layer] & 8 ? 0 : 15));
}
- // TODO : is this correct?
+ // TODO : is this correct? // Note layers_ctrl is hardcoded to -1 above: Coverity 315110
if (layers_ctrl & 1)
bgpen = m_palette->pen(((layer_ctrl[0] & 8) ? 0x800 : 0x80f));
else if (layers_ctrl & 2)
@@ -635,7 +635,7 @@ u32 psikyo_state::screen_update_bootleg(screen_device &screen, bitmap_rgb32 &bit
m_tilemap[layer]->set_transparent_pen((layer_ctrl[layer] & 8 ? 0 : 15));
}
- // TODO : is this correct?
+ // TODO : is this correct? // Note layers_ctrl is hardcoded to -1 above: Coverity 315935
if (layers_ctrl & 1)
bgpen = m_palette->pen(((layer_ctrl[0] & 8) ? 0x800 : 0x80f));
else if (layers_ctrl & 2)