diff options
| author | 2022-03-25 15:12:06 +1100 | |
|---|---|---|
| committer | 2022-03-25 15:12:06 +1100 | |
| commit | ebb3a4f142373b1cfbce1f701585d83a0d2e5ec4 (patch) | |
| tree | a8fa974d76501fa6a02d91bb19485cef98d925f1 /src | |
| parent | d0932e991a497ea3064ddf289824472b19c1a8a4 (diff) | |
init vars for coverity (drivers/e)
Diffstat (limited to 'src')
| -rw-r--r-- | src/mame/drivers/ec184x.cpp | 4 | ||||
| -rw-r--r-- | src/mame/drivers/ecoinfr.cpp | 26 | ||||
| -rw-r--r-- | src/mame/drivers/egghunt.cpp | 12 | ||||
| -rw-r--r-- | src/mame/drivers/elzet80.cpp | 2 | ||||
| -rw-r--r-- | src/mame/drivers/embargo.cpp | 6 | ||||
| -rw-r--r-- | src/mame/drivers/emu3.cpp | 4 | ||||
| -rw-r--r-- | src/mame/drivers/enigma2.cpp | 16 | ||||
| -rw-r--r-- | src/mame/drivers/esh.cpp | 4 | ||||
| -rw-r--r-- | src/mame/drivers/esq1.cpp | 24 | ||||
| -rw-r--r-- | src/mame/drivers/esq5505.cpp | 10 | ||||
| -rw-r--r-- | src/mame/drivers/esqkt.cpp | 6 | ||||
| -rw-r--r-- | src/mame/drivers/ettrivia.cpp | 16 | ||||
| -rw-r--r-- | src/mame/drivers/eurocom2.cpp | 14 | ||||
| -rw-r--r-- | src/mame/drivers/europc.cpp | 2 | ||||
| -rw-r--r-- | src/mame/drivers/exelv.cpp | 12 | ||||
| -rw-r--r-- | src/mame/drivers/exidy.cpp | 20 |
16 files changed, 89 insertions, 89 deletions
diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp index cad90a9e95f..f5f03e39670 100644 --- a/src/mame/drivers/ec184x.cpp +++ b/src/mame/drivers/ec184x.cpp @@ -70,8 +70,8 @@ private: struct { - uint8_t enable[4]; - int boards; + uint8_t enable[4]{}; + int boards = 0; } m_memory; }; diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp index 99aadc31aa9..8c0d0a6291a 100644 --- a/src/mame/drivers/ecoinfr.cpp +++ b/src/mame/drivers/ecoinfr.cpp @@ -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; - - 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; + int irq_toggle = 0; + int m_optic_pattern = 0; + + 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); diff --git a/src/mame/drivers/egghunt.cpp b/src/mame/drivers/egghunt.cpp index 92cd1a56d9b..e2012e26fb1 100644 --- a/src/mame/drivers/egghunt.cpp +++ b/src/mame/drivers/egghunt.cpp @@ -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); diff --git a/src/mame/drivers/elzet80.cpp b/src/mame/drivers/elzet80.cpp index 9b21e546fc1..3501adf4478 100644 --- a/src/mame/drivers/elzet80.cpp +++ b/src/mame/drivers/elzet80.cpp @@ -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; diff --git a/src/mame/drivers/embargo.cpp b/src/mame/drivers/embargo.cpp index 44d903197b8..04ec77f3c18 100644 --- a/src/mame/drivers/embargo.cpp +++ b/src/mame/drivers/embargo.cpp @@ -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); diff --git a/src/mame/drivers/emu3.cpp b/src/mame/drivers/emu3.cpp index a10e7fb24ae..5bc87d93251 100644 --- a/src/mame/drivers/emu3.cpp +++ b/src/mame/drivers/emu3.cpp @@ -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() diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp index 56a96075269..01dbcb4337c 100644 --- a/src/mame/drivers/enigma2.cpp +++ b/src/mame/drivers/enigma2.cpp @@ -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; - - emu_timer *m_interrupt_clear_timer; - emu_timer *m_interrupt_assert_timer; + 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 = nullptr; + emu_timer *m_interrupt_assert_timer = nullptr; /* devices */ required_device<cpu_device> m_maincpu; diff --git a/src/mame/drivers/esh.cpp b/src/mame/drivers/esh.cpp index 156b931663b..830ffaa4640 100644 --- a/src/mame/drivers/esh.cpp +++ b/src/mame/drivers/esh.cpp @@ -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); diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp index c7f4869c33d..767f794608c 100644 --- a/src/mame/drivers/esq1.cpp +++ b/src/mame/drivers/esq1.cpp @@ -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 }; diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp index 7e58ed42f04..495878dd39e 100644 --- a/src/mame/drivers/esq5505.cpp +++ b/src/mame/drivers/esq5505.cpp @@ -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(); diff --git a/src/mame/drivers/esqkt.cpp b/src/mame/drivers/esqkt.cpp index 54ea42ec404..87cd3e7c89a 100644 --- a/src/mame/drivers/esqkt.cpp +++ b/src/mame/drivers/esqkt.cpp @@ -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(); diff --git a/src/mame/drivers/ettrivia.cpp b/src/mame/drivers/ettrivia.cpp index f61812bd63f..1550f4ef5da 100644 --- a/src/mame/drivers/ettrivia.cpp +++ b/src/mame/drivers/ettrivia.cpp @@ -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); diff --git a/src/mame/drivers/eurocom2.cpp b/src/mame/drivers/eurocom2.cpp index eb49331f07f..2bf55d6a0d2 100644 --- a/src/mame/drivers/eurocom2.cpp +++ b/src/mame/drivers/eurocom2.cpp @@ -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; diff --git a/src/mame/drivers/europc.cpp b/src/mame/drivers/europc.cpp index ae8169fe004..110d67c49d0 100644 --- a/src/mame/drivers/europc.cpp +++ b/src/mame/drivers/europc.cpp @@ -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); diff --git a/src/mame/drivers/exelv.cpp b/src/mame/drivers/exelv.cpp index 6d37ef734e3..dd2ce70c958 100644 --- a/src/mame/drivers/exelv.cpp +++ b/src/mame/drivers/exelv.cpp @@ -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); diff --git a/src/mame/drivers/exidy.cpp b/src/mame/drivers/exidy.cpp index 687ca1f4b8c..e111f474647 100644 --- a/src/mame/drivers/exidy.cpp +++ b/src/mame/drivers/exidy.cpp @@ -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); }; |
