mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
audio rax: Coverity 315527
This commit is contained in:
parent
5faba2b813
commit
5569db9be3
@ -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);
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user