summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2025-04-25 16:32:40 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2025-04-25 16:32:40 +0700
commitcb26772f0f9294247671bd9b79122721ff9361f4 (patch)
tree49dbf4f69ef8508f2fa9165c8bd9b94f3a462423
parent0fe210ceef881fac79b4a7f2f26d2e498565b1fb (diff)
fix various bitwise/logical warnings
-rw-r--r--src/devices/cpu/drcbex64.cpp2
-rw-r--r--src/devices/cpu/dsp56156/dsp56ops.hxx4
-rw-r--r--src/devices/sound/upd933.cpp4
-rw-r--r--src/mame/korg/polysix.cpp2
-rw-r--r--src/mame/recfranco/rfslotsmcs48.cpp2
-rw-r--r--src/mame/sharp/x1.cpp2
-rw-r--r--src/mame/yamaha/ymvl1.cpp2
7 files changed, 9 insertions, 9 deletions
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index 8f0e386c795..ab1bd94bb51 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -4082,7 +4082,7 @@ void drcbe_x64::op_rolins(Assembler &a, const instruction &inst)
if (bits != 32)
{
maskimm =
- ((util::sext(mask, 32) == mask) && (uint32_t(~mask) == ~mask)) |
+ ((util::sext(mask, 32) == mask) && (uint32_t(~mask) == ~mask)) ||
((util::sext(~mask, 32) == ~mask) && (uint32_t(mask) == mask));
}
}
diff --git a/src/devices/cpu/dsp56156/dsp56ops.hxx b/src/devices/cpu/dsp56156/dsp56ops.hxx
index 1072a163c7a..0a3c33a8f96 100644
--- a/src/devices/cpu/dsp56156/dsp56ops.hxx
+++ b/src/devices/cpu/dsp56156/dsp56ops.hxx
@@ -4946,9 +4946,9 @@ static int decode_cccc_table(dsp56156_core* cpustate, uint16_t cccc)
case 0x9: if((N() ^ V()) == 1) retVal = 1; break; /* lt */
case 0xb: if( N() == 1) retVal = 1; break; /* mi */
case 0x2: if( Z() == 0) retVal = 1; break; /* ne */
- case 0xc: if((Z() | ((!U()) & (!E()))) == 1) retVal = 1; break; /* nr */
+ case 0xc: if((Z() || ((!U()) && (!E())))) retVal = 1; break; /* nr */
case 0x3: if( N() == 0) retVal = 1; break; /* pl */
- case 0x4: if((Z() | ((!U()) & (!E()))) == 0) retVal = 1; break; /* nn */
+ case 0x4: if(!(Z() || ((!U()) && (!E())))) retVal = 1; break; /* nn */
}
return retVal;
diff --git a/src/devices/sound/upd933.cpp b/src/devices/sound/upd933.cpp
index 6167ec2a3c1..fa96a241120 100644
--- a/src/devices/sound/upd933.cpp
+++ b/src/devices/sound/upd933.cpp
@@ -199,8 +199,8 @@ void upd933_device::update_pending_irq()
for (int i = 0; i < 8; i++)
{
env_active |= (m_dca[i].calc_timeout(new_time)
- | m_dco[i].calc_timeout(new_time)
- | m_dcw[i].calc_timeout(new_time));
+ || m_dco[i].calc_timeout(new_time)
+ || m_dcw[i].calc_timeout(new_time));
}
if (env_active)
diff --git a/src/mame/korg/polysix.cpp b/src/mame/korg/polysix.cpp
index bb2475eb4ad..09ec249ea6b 100644
--- a/src/mame/korg/polysix.cpp
+++ b/src/mame/korg/polysix.cpp
@@ -374,7 +374,7 @@ void polysix_sound_block::sound_stream_update(sound_stream &stream, std::vector<
// Compute the threshold
float pw_thr = pw_threshold[m_pw_pwm];
- if(BIT(m_control_low, 3) || 1)
+ if(BIT(m_control_low, 3))
// PWM mode, the modulation multiplies the threshold part over 0.5 with the phase wrapped between 0.2 and 1
pw_thr = 0.5 + (pw_thr - 0.5) * (0.2 + pwm_phase * 0.8);
diff --git a/src/mame/recfranco/rfslotsmcs48.cpp b/src/mame/recfranco/rfslotsmcs48.cpp
index 61cecd7ebd0..a8648b569d9 100644
--- a/src/mame/recfranco/rfslotsmcs48.cpp
+++ b/src/mame/recfranco/rfslotsmcs48.cpp
@@ -553,7 +553,7 @@ void rfslotsmcs48_state::hopper_decode()
*/
u8 res = 0xff;
- if(!BIT(m_hdecode, 0) & (!BIT(m_hdecode, 1))) // g1&g2=0
+ if(!BIT(m_hdecode, 0, 2)) // g1&g2=0
{
u8 a, b, c, d;
d = BIT(m_maincpu->p1_r(), 6);
diff --git a/src/mame/sharp/x1.cpp b/src/mame/sharp/x1.cpp
index 03eaf413078..f9929d5e4f5 100644
--- a/src/mame/sharp/x1.cpp
+++ b/src/mame/sharp/x1.cpp
@@ -774,7 +774,7 @@ void x1_state::fdc_w(offs_t offset, uint8_t data)
{
floppy->ss_w(BIT(data, 4));
if(BIT(m_fdc_ctrl, 7) && !BIT(data, 7))
- m_motor_timer->adjust(attotime::from_seconds(1.2));
+ m_motor_timer->adjust(attotime::from_msec(1200));
else if(BIT(data, 7))
floppy->mon_w(0);
}
diff --git a/src/mame/yamaha/ymvl1.cpp b/src/mame/yamaha/ymvl1.cpp
index 168169d71b7..ba580467c04 100644
--- a/src/mame/yamaha/ymvl1.cpp
+++ b/src/mame/yamaha/ymvl1.cpp
@@ -102,7 +102,7 @@ private:
void vl1_state::led_w(u16 data)
{
u8 activated = (((~m_led) & data) >> 8) & 0xf;
- if(activated && 0) {
+ if(activated && false) {
if(activated & 1)
logerror("led.0 %02x\n", data & 0xff);
if(activated & 2)