init vars for coverity (drivers/e)

This commit is contained in:
Robbbert 2022-03-25 15:12:06 +11:00
parent d0932e991a
commit ebb3a4f142
16 changed files with 87 additions and 87 deletions

View File

@ -70,8 +70,8 @@ private:
struct
{
uint8_t enable[4];
int boards;
uint8_t enable[4]{};
int boards = 0;
} m_memory;
};

View File

@ -17,7 +17,7 @@
------------------------------
WARNING: I have little faith in many of these sets being what they claim to be,
the headers in the ROMs often indicate different titles, and sevearl of
the headers in the ROMs often indicate different titles, and several of
the sets contain what look to be games on different hardware, or entirely
different game, there was even a Data East Pinball ROM in with this lot.
@ -72,18 +72,18 @@ public:
DECLARE_READ_LINE_MEMBER(reel3_opto_r);
private:
int irq_toggle;
int m_optic_pattern;
int irq_toggle = 0;
int m_optic_pattern = 0;
uint8_t port09_value;
uint8_t port10_value;
uint8_t port11_value;
uint8_t port12_value;
uint8_t port13_value;
uint8_t port14_value;
uint8_t port15_value;
uint8_t port16_value;
uint8_t port17_value;
uint8_t port09_value = 0;
uint8_t port10_value = 0;
uint8_t port11_value = 0;
uint8_t port12_value = 0;
uint8_t port13_value = 0;
uint8_t port14_value = 0;
uint8_t port15_value = 0;
uint8_t port16_value = 0;
uint8_t port17_value = 0;
template <unsigned N> DECLARE_WRITE_LINE_MEMBER(reel_optic_cb) { if (state) m_optic_pattern |= (1 << N); else m_optic_pattern &= ~(1 << N); }
void ec_port00_out_w(uint8_t data);

View File

@ -70,20 +70,20 @@ public:
private:
/* video-related */
tilemap_t *m_bg_tilemap;
uint8_t m_vidram_bank;
tilemap_t *m_bg_tilemap = nullptr;
uint8_t m_vidram_bank = 0;
/* misc */
uint8_t m_okibanking;
uint8_t m_gfx_banking;
uint8_t m_okibanking = 0;
uint8_t m_gfx_banking = 0;
/* devices */
required_device<cpu_device> m_audiocpu;
/* memory */
required_shared_ptr<uint8_t> m_atram;
uint8_t m_bgram[0x1000];
uint8_t m_spram[0x1000];
uint8_t m_bgram[0x1000]{};
uint8_t m_spram[0x1000]{};
uint8_t egghunt_bgram_r(offs_t offset);
void egghunt_bgram_w(offs_t offset, uint8_t data);
void egghunt_atram_w(offs_t offset, uint8_t data);

View File

@ -80,7 +80,7 @@ private:
void mem_map(address_map &map);
void io_map(address_map &map);
floppy_image_device *m_floppy;
floppy_image_device *m_floppy = nullptr;
required_device<cpu_device> m_maincpu;
required_device<z80ctc_device> m_ctc;
required_device<z80dma_device> m_dma;

View File

@ -26,9 +26,9 @@ private:
required_shared_ptr<uint8_t> m_videoram;
/* misc */
uint8_t m_dial_enable_1;
uint8_t m_dial_enable_2;
uint8_t m_input_select;
uint8_t m_dial_enable_1 = 0;
uint8_t m_dial_enable_2 = 0;
uint8_t m_input_select = 0;
uint8_t input_port_bit_r();
uint8_t dial_r();
void port_1_w(uint8_t data);

View File

@ -122,8 +122,8 @@ private:
}
}
u8 m_irq_latch;
bool m_irq_state;
u8 m_irq_latch = 0;
bool m_irq_state = false;
};
void emu3_state::machine_start()

View File

@ -189,14 +189,14 @@ private:
required_shared_ptr<uint8_t> m_videoram;
/* misc */
int m_blink_count;
uint8_t m_sound_latch;
uint8_t m_last_sound_data;
uint8_t m_protection_data;
uint8_t m_flip_screen;
int m_blink_count = 0;
uint8_t m_sound_latch = 0;
uint8_t m_last_sound_data = 0;
uint8_t m_protection_data = 0;
uint8_t m_flip_screen = 0;
emu_timer *m_interrupt_clear_timer;
emu_timer *m_interrupt_assert_timer;
emu_timer *m_interrupt_clear_timer = nullptr;
emu_timer *m_interrupt_assert_timer = nullptr;
/* devices */
required_device<cpu_device> m_maincpu;

View File

@ -62,12 +62,12 @@ private:
required_device<screen_device> m_screen;
required_shared_ptr<uint8_t> m_tile_ram;
required_shared_ptr<uint8_t> m_tile_control_ram;
bool m_ld_video_visible;
bool m_ld_video_visible = false;
uint8_t ldp_read();
void misc_write(uint8_t data);
void led_writes(offs_t offset, uint8_t data);
void nmi_line_w(uint8_t data);
bool m_nmi_enable;
bool m_nmi_enable = false;
void esh_palette(palette_device &palette) const;
uint32_t screen_update_esh(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
INTERRUPT_GEN_MEMBER(vblank_callback_esh);

View File

@ -214,15 +214,15 @@ protected:
private:
struct filter {
uint8_t vca, vpan, vq, vfc;
double amp, lamp, ramp;
double a[5], b[5];
double x[4], y[4];
uint8_t vca = 0, vpan = 0, vq = 0, vfc = 0;
double amp = 0, lamp = 0, ramp = 0;
double a[5]{}, b[5]{};
double x[4]{}, y[4]{};
};
filter filters[8];
filter filters[8]{};
sound_stream *stream;
sound_stream *stream = nullptr;
void recalc_filter(filter &f);
};
@ -427,10 +427,10 @@ private:
uint8_t es5503_sample_r(offs_t offset);
int m_mapper_state;
int m_seq_bank;
uint8_t m_seqram[0x10000];
uint8_t m_dosram[0x2000];
int m_mapper_state = 0;
int m_seq_bank = 0;
uint8_t m_seqram[0x10000]{};
uint8_t m_dosram[0x2000]{};
virtual void machine_reset() override;
void send_through_panel(uint8_t data);
@ -438,8 +438,8 @@ private:
void sq80_map(address_map &map);
void sq80_es5503_map(address_map &map);
bool kpc_calibrated; // sq80 requires keyboard calibration acknowledgement
int m_adc_target; // adc poll target (index into the table below)
bool kpc_calibrated = false; // sq80 requires keyboard calibration acknowledgement
int m_adc_target = 0; // adc poll target (index into the table below)
uint8_t m_adc_value[6] = { 0,0,128,0,0,0 }; // VALV,PEDV,PITV,MODV,FILV,BATV
};

View File

@ -266,11 +266,11 @@ private:
void es5505_clock_changed(u32 data);
int m_system_type;
uint8_t m_duart_io;
uint8_t m_otis_irq_state;
uint8_t m_dmac_irq_state;
uint8_t m_duart_irq_state;
int m_system_type = 0;
uint8_t m_duart_io = 0;
uint8_t m_otis_irq_state = 0;
uint8_t m_dmac_irq_state = 0;
uint8_t m_duart_irq_state = 0;
void update_irq_to_maincpu();

View File

@ -138,9 +138,9 @@ private:
DECLARE_WRITE_LINE_MEMBER(duart_tx_b);
void duart_output(u8 data);
u16 *m_rom, *m_ram;
u8 m_duart_io;
bool m_bCalibSecondByte; // only set to false on machine_reset()?
u16 *m_rom = nullptr, *m_ram = nullptr;
u8 m_duart_io = 0;
bool m_bCalibSecondByte = false; // only set to false on machine_reset()?
DECLARE_WRITE_LINE_MEMBER(esq5506_otto_irq);
u16 esq5506_read_adc();

View File

@ -56,16 +56,16 @@ protected:
virtual void video_start() override;
private:
int m_palreg;
int m_gfx_bank;
int m_question_bank;
int m_b000_val;
int m_b000_ret;
int m_b800_prev;
int m_palreg = 0;
int m_gfx_bank = 0;
int m_question_bank = 0;
int m_b000_val = 0;
int m_b000_ret = 0;
int m_b800_prev = 0;
required_shared_ptr<uint8_t> m_fg_videoram;
required_shared_ptr<uint8_t> m_bg_videoram;
tilemap_t *m_bg_tilemap;
tilemap_t *m_fg_tilemap;
tilemap_t *m_bg_tilemap = nullptr;
tilemap_t *m_fg_tilemap = nullptr;
void ettrivia_fg_w(offs_t offset, uint8_t data);
void ettrivia_bg_w(offs_t offset, uint8_t data);
void ettrivia_control_w(uint8_t data);

View File

@ -107,14 +107,14 @@ protected:
virtual void machine_start() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param) override;
emu_timer *m_sst;
emu_timer *m_sst = nullptr;
floppy_image_device *m_floppy;
bool m_sst_state, m_kbd_ready;
floppy_image_device *m_floppy = nullptr;
bool m_sst_state = false, m_kbd_ready = false;
bitmap_ind16 m_tmpbmp;
uint8_t m_vico[2];
uint8_t m_kbd_data;
uint8_t m_vico[2]{};
uint8_t m_kbd_data = 0;
required_device<cpu_device> m_maincpu;
required_device<pia6821_device> m_pia1;
@ -151,8 +151,8 @@ private:
void waveterm_map(address_map &map);
bool m_driveh;
uint8_t m_drive;
bool m_driveh = false;
uint8_t m_drive = 0;
required_device<pia6821_device> m_pia3;
required_device<ptm6840_device> m_ptm;

View File

@ -76,7 +76,7 @@ private:
uint8_t m_jim_data[16];
uint8_t m_jim_state;
isa8_aga_device::mode_t m_jim_mode;
isa8_aga_device::mode_t m_jim_mode{};
int m_port61; // bit 0,1 must be 0 for startup; reset?
void europc_io(address_map &map);

View File

@ -109,16 +109,16 @@ private:
DECLARE_MACHINE_START(exeltel);
/* tms7020 i/o ports */
uint8_t m_tms7020_portb;
uint8_t m_tms7020_portb = 0;
/* tms7041 i/o ports */
uint8_t m_tms7041_portb;
uint8_t m_tms7041_portc;
uint8_t m_tms7041_portd;
uint8_t m_tms7041_portb = 0;
uint8_t m_tms7041_portc = 0;
uint8_t m_tms7041_portd = 0;
/* mailbox data */
uint8_t m_wx318; /* data of 74ls374 labeled wx318 */
uint8_t m_wx319; /* data of 74sl374 labeled wx319 */
uint8_t m_wx318 = 0; /* data of 74ls374 labeled wx318 */
uint8_t m_wx319 = 0; /* data of 74sl374 labeled wx319 */
TIMER_DEVICE_CALLBACK_MEMBER(exelv_hblank_interrupt);

View File

@ -236,10 +236,10 @@ private:
required_shared_ptr<uint8_t> m_sprite_enable;
optional_shared_ptr<uint8_t> m_characterram;
uint8_t m_collision_mask;
uint8_t m_collision_invert;
int m_is_2bpp;
uint8_t m_int_condition;
uint8_t m_collision_mask = 0;
uint8_t m_collision_invert = 0;
int m_is_2bpp = 0;
uint8_t m_int_condition = 0;
bitmap_ind16 m_background_bitmap;
bitmap_ind16 m_motion_object_1_vid;
bitmap_ind16 m_motion_object_2_vid;
@ -300,10 +300,10 @@ private:
required_device<samples_device> m_samples;
// Targ and Spectar samples
int m_max_freq;
uint8_t m_port_1_last;
uint8_t m_tone_freq;
uint8_t m_tone_active;
int m_max_freq = 0;
uint8_t m_port_1_last = 0;
uint8_t m_tone_freq = 0;
uint8_t m_tone_active = 0;
void sidetrac_map(address_map &map);
void spectar_map(address_map &map);
@ -334,8 +334,8 @@ protected:
private:
required_region_ptr<uint8_t> m_sound_prom;
uint8_t m_port_2_last;
uint8_t m_tone_pointer;
uint8_t m_port_2_last = 0;
uint8_t m_tone_pointer = 0;
void targ_map(address_map &map);
};