From a1719a7c9c194e92e987622a4986cb3442ca5263 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Sun, 14 Feb 2021 04:12:17 +1100 Subject: [PATCH] cmi01a: Coverity 315772; fm7: Coverity 315775 --- src/mame/audio/cmi01a.cpp | 2 +- src/mame/video/fm7.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mame/audio/cmi01a.cpp b/src/mame/audio/cmi01a.cpp index cd5764356d4..5577805856f 100644 --- a/src/mame/audio/cmi01a.cpp +++ b/src/mame/audio/cmi01a.cpp @@ -252,7 +252,7 @@ void cmi01a_device::pulse_gzx() void cmi01a_device::reset_waveform_segment() { m_segment_cnt &= 0x007f; - m_segment_cnt = 0x4000 | (m_ws << 7); + m_segment_cnt |= (0x4000 | (m_ws << 7)); } void cmi01a_device::load_w(int state) diff --git a/src/mame/video/fm7.cpp b/src/mame/video/fm7.cpp index e8848220c10..69567c85688 100644 --- a/src/mame/video/fm7.cpp +++ b/src/mame/video/fm7.cpp @@ -363,10 +363,13 @@ void fm77_state::alu_function_not(uint32_t offset) { if(!(m_alu.bank_disable & (1 << x))) { +#ifdef UNUSED + // "dat" is overwritten before it can get used: Coverity 315775 if(m_alu.lcolour & (1 << x)) dat = 0xff; else dat = 0; +#endif mask = (m_video_ram[(offset & 0x3fff) + (x * 0x4000) + (page * 0xc000)]); dat = ~mask;