Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Commit 3a705ab

Browse files
RobbbertRobbbert
Robbbert
authored and
Robbbert
committed
Fixed some clang warnings
1 parent 4052e5d commit 3a705ab

File tree

6 files changed

+37
-50
lines changed

6 files changed

+37
-50
lines changed

src/mess/drivers/c10.c

+13-17
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ class c10_state : public driver_device
2222
public:
2323
c10_state(const machine_config &mconfig, device_type type, const char *tag)
2424
: driver_device(mconfig, type, tag),
25-
m_maincpu(*this, "maincpu")
26-
,
27-
m_p_videoram(*this, "p_videoram"){ }
25+
m_maincpu(*this, "maincpu"),
26+
m_p_videoram(*this, "p_videoram"){ }
2827

2928
required_device<cpu_device> m_maincpu;
3029
const UINT8 *m_p_chargen;
@@ -102,20 +101,17 @@ SCREEN_UPDATE16_MEMBER( c10_state )
102101
if BIT(chr, 7) // ignore attribute bytes
103102
x--;
104103
else
105-
{
106104
gfx = m_p_chargen[(chr<<4) | ra ];
107-
108-
/* Display a scanline of a character */
109-
*p++ = BIT(gfx, 7);
110-
*p++ = BIT(gfx, 6);
111-
*p++ = BIT(gfx, 5);
112-
*p++ = BIT(gfx, 4);
113-
*p++ = BIT(gfx, 3);
114-
*p++ = BIT(gfx, 2);
115-
*p++ = BIT(gfx, 1);
116-
*p++ = BIT(gfx, 0);
117-
}
118105
}
106+
/* Display a scanline of a character */
107+
*p++ = BIT(gfx, 7);
108+
*p++ = BIT(gfx, 6);
109+
*p++ = BIT(gfx, 5);
110+
*p++ = BIT(gfx, 4);
111+
*p++ = BIT(gfx, 3);
112+
*p++ = BIT(gfx, 2);
113+
*p++ = BIT(gfx, 1);
114+
*p++ = BIT(gfx, 0);
119115
}
120116
}
121117
ma+=96;
@@ -178,5 +174,5 @@ ROM_END
178174

179175
/* Driver */
180176

181-
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
182-
COMP( 1982, c10, 0, 0, c10, c10, c10, "Cromemco", "C-10", GAME_NOT_WORKING | GAME_NO_SOUND)
177+
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
178+
COMP( 1982, c10, 0, 0, c10, c10, c10, "Cromemco", "C-10", GAME_NOT_WORKING | GAME_NO_SOUND)

src/mess/drivers/mes.c

+13-17
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ class mes_state : public driver_device
1818
public:
1919
mes_state(const machine_config &mconfig, device_type type, const char *tag)
2020
: driver_device(mconfig, type, tag),
21-
m_maincpu(*this, "maincpu")
22-
,
23-
m_p_videoram(*this, "p_videoram"){ }
21+
m_maincpu(*this, "maincpu"),
22+
m_p_videoram(*this, "p_videoram"){ }
2423

2524
required_device<cpu_device> m_maincpu;
2625
const UINT8 *m_p_chargen;
@@ -87,20 +86,17 @@ SCREEN_UPDATE16_MEMBER( mes_state )
8786
if (chr & 0x80) // ignore attribute bytes
8887
x--;
8988
else
90-
{
9189
gfx = m_p_chargen[(chr<<4) | ra ];
92-
93-
/* Display a scanline of a character */
94-
*p++ = BIT(gfx, 7);
95-
*p++ = BIT(gfx, 6);
96-
*p++ = BIT(gfx, 5);
97-
*p++ = BIT(gfx, 4);
98-
*p++ = BIT(gfx, 3);
99-
*p++ = BIT(gfx, 2);
100-
*p++ = BIT(gfx, 1);
101-
*p++ = BIT(gfx, 0);
102-
}
10390
}
91+
/* Display a scanline of a character */
92+
*p++ = BIT(gfx, 7);
93+
*p++ = BIT(gfx, 6);
94+
*p++ = BIT(gfx, 5);
95+
*p++ = BIT(gfx, 4);
96+
*p++ = BIT(gfx, 3);
97+
*p++ = BIT(gfx, 2);
98+
*p++ = BIT(gfx, 1);
99+
*p++ = BIT(gfx, 0);
104100
}
105101
}
106102
ma+=80;
@@ -141,5 +137,5 @@ ROM_END
141137

142138
/* Driver */
143139

144-
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
145-
COMP( 198?, mes, 0, 0, mes, mes, 0, "Schleicher", "MES", GAME_NOT_WORKING | GAME_NO_SOUND)
140+
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
141+
COMP( 198?, mes, 0, 0, mes, mes, 0, "Schleicher", "MES", GAME_NOT_WORKING | GAME_NO_SOUND)

src/mess/drivers/pegasus.c

+4-7
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ class pegasus_state : public driver_device
5757
m_maincpu(*this, "maincpu"),
5858
m_cass(*this, CASSETTE_TAG),
5959
m_pia_s(*this, "pia_s"),
60-
m_pia_u(*this, "pia_u")
61-
,
62-
m_p_videoram(*this, "p_videoram"){ }
60+
m_pia_u(*this, "pia_u"),
61+
m_p_videoram(*this, "p_videoram"){ }
6362

6463
required_device<cpu_device> m_maincpu;
6564
required_device<cassette_image_device> m_cass;
@@ -351,7 +350,6 @@ SCREEN_UPDATE16_MEMBER( pegasus_state )
351350
for(x = ma; x < ma + 32; x++ )
352351
{
353352
inv = 0xff;
354-
gfx = 0;
355353
chr = m_p_videoram[x];
356354

357355
if (BIT(chr, 7))
@@ -575,6 +573,5 @@ ROM_END
575573
/* Driver */
576574

577575
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
578-
COMP( 1981, pegasus, 0, 0, pegasus, pegasus, pegasus, "Technosys", "Aamber Pegasus", GAME_NO_SOUND_HW )
579-
COMP( 1981, pegasusm, pegasus, 0, pegasusm, pegasus, pegasus, "Technosys", "Aamber Pegasus with RAM expansion unit", GAME_NO_SOUND_HW )
580-
576+
COMP( 1981, pegasus, 0, 0, pegasus, pegasus, pegasus, "Technosys", "Aamber Pegasus", GAME_NO_SOUND_HW )
577+
COMP( 1981, pegasusm, pegasus, 0, pegasusm, pegasus, pegasus, "Technosys", "Aamber Pegasus with RAM expansion unit", GAME_NO_SOUND_HW )

src/mess/drivers/ptcsol.c

+2-4
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ class sol20_state : public driver_device
135135
m_cass1(*this, CASSETTE_TAG),
136136
m_cass2(*this, CASSETTE2_TAG),
137137
m_uart(*this, "uart"),
138-
m_uart_s(*this, "uart_s")
139-
,
140-
m_p_videoram(*this, "p_videoram"){ }
138+
m_uart_s(*this, "uart_s"),
139+
m_p_videoram(*this, "p_videoram"){ }
141140

142141
required_device<cpu_device> m_maincpu;
143142
required_device<cassette_image_device> m_cass1;
@@ -638,7 +637,6 @@ SCREEN_UPDATE16_MEMBER( sol20_state )
638637
inv ^= 0xff;
639638

640639
chr &= 0x7f;
641-
gfx = 0;
642640

643641
if ((ra == 0) || ((s1 & 4) && (chr < 0x20)))
644642
gfx = inv;

src/mess/machine/kaypro.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -229,23 +229,23 @@ WRITE8_MEMBER( kaypro_state::kaypro2x_system_port_w )
229229

230230
WRITE8_MEMBER( kaypro_state::kaypro_baud_a_w ) /* channel A - RS232C */
231231
{
232-
data &= 0x0f;
232+
// data &= 0x0f;
233233

234234
// z80sio_set_rx_clock( m_sio, baud_clock[data], 0);
235235
// z80sio_set_tx_clock( m_sio, baud_clock[data], 0);
236236
}
237237

238238
WRITE8_MEMBER( kaypro_state::kayproii_baud_b_w ) /* Channel B - Keyboard - only usable speed is 300 baud */
239239
{
240-
data &= 0x0f;
240+
// data &= 0x0f;
241241

242242
// z80sio_set_rx_clock( m_sio, baud_clock[data], 1);
243243
// z80sio_set_tx_clock( m_sio, baud_clock[data], 1);
244244
}
245245

246246
WRITE8_MEMBER( kaypro_state::kaypro2x_baud_a_w ) /* Channel A on 2nd SIO - Serial Printer */
247247
{
248-
data &= 0x0f;
248+
// data &= 0x0f;
249249

250250
// z80sio_set_rx_clock( m_sio2x, baud_clock[data], 0);
251251
// z80sio_set_tx_clock( m_sio2x, baud_clock[data], 0);

src/mess/machine/pokemini.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ static void pokemini_update_sound( running_machine &machine )
175175
}
176176
else
177177
{
178-
static const int levels[4] = { 0, 1, 1, 2 };
179-
int level = levels[ state->m_pm_reg[0x71] & 0x03 ];
178+
///static const int levels[4] = { 0, 1, 1, 2 };
179+
int level; /// silence clang warning/// = levels[ state->m_pm_reg[0x71] & 0x03 ];
180180

181181
// if ( ( ( state->m_pm_reg[0x48] & 0x80 ) && ( state->m_pm_reg[0x4E] | ( state->m_pm_reg[0x4F] << 8 ) ) > ( state->m_pm_reg[0x4C] | ( state->m_pm_reg[0x4D] << 8 ) ) )
182182
// || ( ( state->m_pm_reg[0x48] & 0x80 ) && state->m_pm_reg[0x4F] > state->m_pm_reg[0x4D] ) )

0 commit comments

Comments
 (0)