From 8c2ccc812507d7ed76c70548813b625fedcdc3b7 Mon Sep 17 00:00:00 2001 From: Robbbert Date: Wed, 23 Mar 2022 07:16:30 +1100 Subject: init more vars for coverity --- src/mame/includes/hcastle.h | 14 ++++++------ src/mame/includes/hexion.h | 18 +++++++-------- src/mame/includes/hh_tms1k.h | 12 +++++----- src/mame/includes/higemaru.h | 2 +- src/mame/includes/himesiki.h | 8 +++---- src/mame/includes/hitme.h | 4 ++-- src/mame/includes/hng64.h | 38 ++++++++++++++++---------------- src/mame/includes/holeland.h | 4 ++-- src/mame/includes/hp48.h | 48 ++++++++++++++++++++-------------------- src/mame/includes/hyhoo.h | 26 +++++++++++----------- src/mame/includes/hyperspt.h | 6 ++--- src/mame/includes/ikki.h | 8 +++---- src/mame/includes/iqblock.h | 8 +++---- src/mame/includes/irobot.h | 52 ++++++++++++++++++++++---------------------- src/mame/includes/ironhors.h | 8 +++---- src/mame/includes/itech8.h | 6 ++--- src/mame/includes/jack.h | 14 ++++++------ src/mame/includes/jaguar.h | 12 +++++----- src/mame/includes/jailbrek.h | 6 ++--- 19 files changed, 147 insertions(+), 147 deletions(-) diff --git a/src/mame/includes/hcastle.h b/src/mame/includes/hcastle.h index f4c47e41b25..8402f930bf5 100644 --- a/src/mame/includes/hcastle.h +++ b/src/mame/includes/hcastle.h @@ -44,13 +44,13 @@ private: required_shared_ptr m_pf2_videoram; /* video-related */ - tilemap_t *m_fg_tilemap; - tilemap_t *m_bg_tilemap; - int m_pf2_bankbase; - int m_pf1_bankbase; - int m_old_pf1; - int m_old_pf2; - int m_gfx_bank; + tilemap_t *m_fg_tilemap = nullptr; + tilemap_t *m_bg_tilemap = nullptr; + int m_pf2_bankbase = 0; + int m_pf1_bankbase = 0; + int m_old_pf1 = 0; + int m_old_pf2 = 0; + int m_gfx_bank = 0; /* devices */ required_device m_audiocpu; diff --git a/src/mame/includes/hexion.h b/src/mame/includes/hexion.h index 63bead0f64c..c353636b159 100644 --- a/src/mame/includes/hexion.h +++ b/src/mame/includes/hexion.h @@ -33,15 +33,15 @@ private: required_device m_gfxdecode; required_device m_palette; - uint8_t *m_vram[2]; - uint8_t *m_unkram; - int m_bankctrl; - int m_rambank; - int m_pmcbank; - int m_gfxrom_select; - int m_ccu_int_time; - int m_ccu_int_time_count; - tilemap_t *m_bg_tilemap[2]; + uint8_t *m_vram[2]{}; + uint8_t *m_unkram = nullptr; + int m_bankctrl = 0; + int m_rambank = 0; + int m_pmcbank = 0; + int m_gfxrom_select = 0; + int m_ccu_int_time = 0; + int m_ccu_int_time_count = 0; + tilemap_t *m_bg_tilemap[2]{}; void coincntr_w(uint8_t data); void bankswitch_w(uint8_t data); diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h index 3435455d5b7..7d9904e4377 100644 --- a/src/mame/includes/hh_tms1k.h +++ b/src/mame/includes/hh_tms1k.h @@ -53,13 +53,13 @@ protected: output_finder<> m_out_power; // power state, eg. led // misc common - u16 m_r; // MCU R-pins data - u16 m_o; // MCU O-pins data - u32 m_inp_mux; // multiplexed inputs mask - bool m_power_on; + u16 m_r = 0U; // MCU R-pins data + u16 m_o = 0U; // MCU O-pins data + u32 m_inp_mux = 0U; // multiplexed inputs mask + bool m_power_on = false; - u32 m_grid; // VFD/LED current row data - u32 m_plate; // VFD/LED current column data + u32 m_grid = 0U; // VFD/LED current row data + u32 m_plate = 0U; // VFD/LED current column data u8 read_inputs(int columns); u8 read_rotated_inputs(int columns, u8 rowmask = 0xf); diff --git a/src/mame/includes/higemaru.h b/src/mame/includes/higemaru.h index f7793361389..78f9340bb49 100644 --- a/src/mame/includes/higemaru.h +++ b/src/mame/includes/higemaru.h @@ -36,7 +36,7 @@ private: required_shared_ptr m_spriteram; /* video-related */ - tilemap_t *m_bg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; void higemaru_videoram_w(offs_t offset, uint8_t data); void higemaru_colorram_w(offs_t offset, uint8_t data); void higemaru_c800_w(uint8_t data); diff --git a/src/mame/includes/himesiki.h b/src/mame/includes/himesiki.h index ab8b31e7660..40844635370 100644 --- a/src/mame/includes/himesiki.h +++ b/src/mame/includes/himesiki.h @@ -39,11 +39,11 @@ private: required_shared_ptr m_spriteram; // video-related - tilemap_t *m_bg_tilemap; - int m_scrollx[2]; - int m_scrolly; + tilemap_t *m_bg_tilemap = nullptr; + int m_scrollx[2]{}; + int m_scrolly = 0; - int m_flipscreen; + int m_flipscreen = 0; // devices required_device m_maincpu; diff --git a/src/mame/includes/hitme.h b/src/mame/includes/hitme.h index 37f513d9599..c3087969d2e 100644 --- a/src/mame/includes/hitme.h +++ b/src/mame/includes/hitme.h @@ -40,10 +40,10 @@ private: required_shared_ptr m_videoram; /* video-related */ - tilemap_t *m_tilemap; + tilemap_t *m_tilemap = nullptr; /* misc */ - attotime m_timeout_time; + attotime m_timeout_time{}; void hitme_vidram_w(offs_t offset, uint8_t data); uint8_t hitme_port_0_r(); uint8_t hitme_port_1_r(); diff --git a/src/mame/includes/hng64.h b/src/mame/includes/hng64.h index 6d77879759b..7470c3967f3 100644 --- a/src/mame/includes/hng64.h +++ b/src/mame/includes/hng64.h @@ -280,40 +280,40 @@ private: uint16_t m_mcu_en; - uint32_t m_activeDisplayList; - uint32_t m_no_machine_error_code; + uint32_t m_activeDisplayList = 0U; + uint32_t m_no_machine_error_code = 0U; - uint32_t m_unk_vreg_toggle; - uint32_t m_p1_trig; + uint32_t m_unk_vreg_toggle = 0U; + uint32_t m_p1_trig = 0U; - //uint32_t *q2; + //uint32_t *q2 = nullptr; std::vector< std::pair > m_spritelist; - uint8_t m_screen_dis; + uint8_t m_screen_dis = 0U; struct hng64_tilemap { - tilemap_t *m_tilemap_8x8; - tilemap_t *m_tilemap_16x16; - tilemap_t *m_tilemap_16x16_alt; + tilemap_t *m_tilemap_8x8 = nullptr; + tilemap_t *m_tilemap_16x16 = nullptr; + tilemap_t *m_tilemap_16x16_alt = nullptr; }; - hng64_tilemap m_tilemap[4]; + hng64_tilemap m_tilemap[4]{}; - uint8_t m_additive_tilemap_debug; + uint8_t m_additive_tilemap_debug = 0U; - uint32_t m_old_animmask; - uint32_t m_old_animbits; - uint16_t m_old_tileflags[4]; + uint32_t m_old_animmask = 0U; + uint32_t m_old_animbits = 0U; + uint16_t m_old_tileflags[4]{}; // 3d State int m_paletteState3d; - float m_projectionMatrix[16]; - float m_modelViewMatrix[16]; - float m_cameraMatrix[16]; + float m_projectionMatrix[16]{}; + float m_modelViewMatrix[16]{}; + float m_cameraMatrix[16]{}; - float m_lightStrength; - float m_lightVector[3]; + float m_lightStrength = 0; + float m_lightVector[3]{}; uint32_t hng64_com_r(offs_t offset, uint32_t mem_mask = ~0); void hng64_com_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/mame/includes/holeland.h b/src/mame/includes/holeland.h index bb04123509a..4e527718d34 100644 --- a/src/mame/includes/holeland.h +++ b/src/mame/includes/holeland.h @@ -44,8 +44,8 @@ private: required_shared_ptr m_spriteram; /* video-related */ - tilemap_t *m_bg_tilemap; - int m_palette_offset; + tilemap_t *m_bg_tilemap = nullptr; + int m_palette_offset = 0; DECLARE_WRITE_LINE_MEMBER(coin_counter_w); diff --git a/src/mame/includes/hp48.h b/src/mame/includes/hp48.h index cf9eae50458..4cdcac9a905 100644 --- a/src/mame/includes/hp48.h +++ b/src/mame/includes/hp48.h @@ -71,17 +71,17 @@ public: hp48_module(device_t &owner) : read(owner), write(owner) { } /* static part */ - uint32_t off_mask; // offset bit-mask, indicates the real size + uint32_t off_mask = 0U; // offset bit-mask, indicates the real size read8sm_delegate read; - const char *read_name; + const char *read_name = nullptr; write8sm_delegate write; - void* data; // non-NULL for banks + void* data = nullptr; // non-NULL for banks int isnop; /* configurable part */ - uint8_t state; // one of HP48_MODULE_ - uint32_t base; // base address - uint32_t mask; // often improperly called size, it is an address select mask + uint8_t state = 0U; // one of HP48_MODULE_ + uint32_t base = 0U; // base address + uint32_t mask = 0U; // often improperly called size, it is an address select mask }; @@ -140,15 +140,15 @@ private: required_device m_palette; required_device m_screen; - uint8_t *m_videoram; - uint8_t m_io[64]; - hp48_models m_model; + uint8_t *m_videoram = nullptr; + uint8_t m_io[64]{}; + hp48_models m_model{}; /* OUT register from SATURN (actually 12-bit) */ - uint16_t m_out; + uint16_t m_out = 0U; /* keyboard interrupt */ - uint8_t m_kdn; + uint8_t m_kdn = 0U; /* RAM/ROM extensions, GX/SX only port1: SX/GX: 32/128 KB @@ -163,19 +163,19 @@ private: output_finder<> m_busy0; output_finder<> m_transmit0; - uint32_t m_bank_switch; - uint32_t m_io_addr; - uint16_t m_crc; - uint8_t m_timer1; - uint32_t m_timer2; - uint8_t m_screens[HP48_NB_SCREENS][64][144]; - int m_cur_screen; - uint8_t* m_rom; - emu_timer *m_1st_timer; - emu_timer *m_2nd_timer; - emu_timer *m_kbd_timer; - std::unique_ptr m_allocated_ram; - std::unique_ptr m_allocated_rom; + uint32_t m_bank_switch = 0U; + uint32_t m_io_addr = 0U; + uint16_t m_crc = 0U; + uint8_t m_timer1 = 0U; + uint32_t m_timer2 = 0U; + uint8_t m_screens[HP48_NB_SCREENS][64][144]{}; + int m_cur_screen = 0; + uint8_t* m_rom = nullptr; + emu_timer *m_1st_timer = nullptr; + emu_timer *m_2nd_timer = nullptr; + emu_timer *m_kbd_timer = nullptr; + std::unique_ptr m_allocated_ram{}; + std::unique_ptr m_allocated_rom{}; }; diff --git a/src/mame/includes/hyhoo.h b/src/mame/includes/hyhoo.h index f9f29d076e2..f280cd64121 100644 --- a/src/mame/includes/hyhoo.h +++ b/src/mame/includes/hyhoo.h @@ -27,19 +27,19 @@ private: required_device m_screen; required_shared_ptr m_clut; - int m_blitter_destx; - int m_blitter_desty; - int m_blitter_sizex; - int m_blitter_sizey; - int m_blitter_src_addr; - int m_blitter_direction_x; - int m_blitter_direction_y; - int m_gfxrom; - int m_dispflag; - int m_highcolorflag; - int m_flipscreen; - bitmap_rgb32 m_tmpbitmap; - emu_timer *m_blitter_timer; + int m_blitter_destx = 0; + int m_blitter_desty = 0; + int m_blitter_sizex = 0; + int m_blitter_sizey = 0; + int m_blitter_src_addr = 0; + int m_blitter_direction_x = 0; + int m_blitter_direction_y = 0; + int m_gfxrom = 0; + int m_dispflag = 0; + int m_highcolorflag = 0; + int m_flipscreen = 0; + bitmap_rgb32 m_tmpbitmap{}; + emu_timer *m_blitter_timer = nullptr; void hyhoo_blitter_w(offs_t offset, uint8_t data); void hyhoo_romsel_w(uint8_t data); diff --git a/src/mame/includes/hyperspt.h b/src/mame/includes/hyperspt.h index 313f70a96c0..068e0ff8f37 100644 --- a/src/mame/includes/hyperspt.h +++ b/src/mame/includes/hyperspt.h @@ -58,10 +58,10 @@ private: required_device m_palette; /* video-related */ - tilemap_t *m_bg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; - uint8_t m_irq_mask; - uint8_t m_SN76496_latch; + uint8_t m_irq_mask = 0U; + uint8_t m_SN76496_latch = 0U; DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); diff --git a/src/mame/includes/ikki.h b/src/mame/includes/ikki.h index 0d2d93e01f1..afb74a3fcbd 100644 --- a/src/mame/includes/ikki.h +++ b/src/mame/includes/ikki.h @@ -49,10 +49,10 @@ private: required_device m_palette; /* video-related */ - bitmap_ind16 m_sprite_bitmap; - uint8_t m_flipscreen; - int m_punch_through_pen; - uint8_t m_irq_source; + bitmap_ind16 m_sprite_bitmap{}; + uint8_t m_flipscreen = 0U; + int m_punch_through_pen = 0; + uint8_t m_irq_source = 0U; uint8_t ikki_e000_r(); void ikki_coin_counters(uint8_t data); diff --git a/src/mame/includes/iqblock.h b/src/mame/includes/iqblock.h index 7ee3ce963af..07438602f54 100644 --- a/src/mame/includes/iqblock.h +++ b/src/mame/includes/iqblock.h @@ -33,10 +33,10 @@ private: required_shared_ptr m_bgvideoram; required_shared_ptr m_fgvideoram; - int m_videoenable; - int m_video_type; - tilemap_t *m_bg_tilemap; - tilemap_t *m_fg_tilemap; + int m_videoenable = 0; + int m_video_type = 0; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; void iqblock_prot_w(uint8_t data); void grndtour_prot_w(uint8_t data); diff --git a/src/mame/includes/irobot.h b/src/mame/includes/irobot.h index b7cdb0a4cf6..5084b446b51 100644 --- a/src/mame/includes/irobot.h +++ b/src/mame/includes/irobot.h @@ -87,32 +87,32 @@ private: void irmb_run(); required_shared_ptr m_videoram; - uint8_t m_vg_clear; - uint8_t m_bufsel; - uint8_t m_alphamap; - uint8_t *m_combase; - uint8_t m_irvg_vblank; - uint8_t m_irvg_running; - uint8_t m_irmb_running; - uint8_t *m_comRAM[2]; - uint8_t *m_mbRAM; - uint8_t *m_mbROM; - uint8_t m_statwr; - uint8_t m_out0; - uint8_t m_outx; - uint8_t m_mpage; - uint8_t *m_combase_mb; - std::unique_ptr m_mbops; - const irmb_ops *m_irmb_stack[16]; - uint32_t m_irmb_regs[16]; - uint32_t m_irmb_latch; - std::unique_ptr m_polybitmap1; - std::unique_ptr m_polybitmap2; - int m_ir_xmin; - int m_ir_ymin; - int m_ir_xmax; - int m_ir_ymax; - emu_timer *m_scanline_timer; + uint8_t m_vg_clear = 0U; + uint8_t m_bufsel = 0U; + uint8_t m_alphamap = 0U; + uint8_t *m_combase = nullptr; + uint8_t m_irvg_vblank = 0U; + uint8_t m_irvg_running = 0U; + uint8_t m_irmb_running = 0U; + uint8_t *m_comRAM[2]{}; + uint8_t *m_mbRAM = nullptr; + uint8_t *m_mbROM = nullptr; + uint8_t m_statwr = 0U; + uint8_t m_out0 = 0U; + uint8_t m_outx = 0U; + uint8_t m_mpage = 0U; + uint8_t *m_combase_mb = nullptr; + std::unique_ptr m_mbops{}; + const irmb_ops *m_irmb_stack[16]{}; + uint32_t m_irmb_regs[16]{}; + uint32_t m_irmb_latch = 0U; + std::unique_ptr m_polybitmap1{}; + std::unique_ptr m_polybitmap2{}; + int m_ir_xmin = 0; + int m_ir_ymin = 0; + int m_ir_xmax = 0; + int m_ir_ymax = 0; + emu_timer *m_scanline_timer = nullptr; required_device m_maincpu; required_device m_gfxdecode; diff --git a/src/mame/includes/ironhors.h b/src/mame/includes/ironhors.h index e2de2d2e41a..a1a6b42da6e 100644 --- a/src/mame/includes/ironhors.h +++ b/src/mame/includes/ironhors.h @@ -69,10 +69,10 @@ protected: required_shared_ptr_array m_spriteram; // video-related - tilemap_t *m_bg_tilemap; - uint8_t m_palettebank; - uint8_t m_charbank; - uint8_t m_spriterambank; + tilemap_t *m_bg_tilemap = nullptr; + uint8_t m_palettebank = 0U; + uint8_t m_charbank = 0U; + uint8_t m_spriterambank = 0U; }; class ironhors_state : public ironhors_base_state diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index 085b3812d68..24b4df5f39c 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -257,9 +257,9 @@ protected: void palette_update(); emu_timer *m_palette_timer; - uint8_t m_palcontrol; - uint8_t m_xscroll; - rgb_t m_palette[2][16]; + uint8_t m_palcontrol = 0U; + uint8_t m_xscroll = 0U; + rgb_t m_palette[2][16]{}; void grmatch_map(address_map &map); }; diff --git a/src/mame/includes/jack.h b/src/mame/includes/jack.h index c0a1f5230af..cc9bd1dbce6 100644 --- a/src/mame/includes/jack.h +++ b/src/mame/includes/jack.h @@ -58,15 +58,15 @@ private: optional_shared_ptr m_decrypted_opcodes; /* video-related */ - tilemap_t *m_bg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; /* misc */ - int m_timer_rate; - uint8_t m_joinem_nmi_enable; - uint8_t m_joinem_palette_bank; - int m_question_address; - int m_question_rom; - int m_remap_address[16]; + int m_timer_rate = 0; + uint8_t m_joinem_nmi_enable = 0U; + uint8_t m_joinem_palette_bank = 0U; + int m_question_address = 0; + int m_question_rom = 0; + int m_remap_address[16]{}; IRQ_CALLBACK_MEMBER(jack_sh_irq_ack); void joinem_control_w(uint8_t data); diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h index 3fce2fb382f..e38991aa767 100644 --- a/src/mame/includes/jaguar.h +++ b/src/mame/includes/jaguar.h @@ -405,11 +405,11 @@ private: required_device m_cdrom; required_region_ptr m_cd_bios; - uint32_t m_butch_regs[0x40/4]; - uint32_t m_butch_cmd_response[0x102]; - uint8_t m_butch_cmd_index; - uint8_t m_butch_cmd_size; + uint32_t m_butch_regs[0x40/4]{}; + uint32_t m_butch_cmd_response[0x102]{}; + uint8_t m_butch_cmd_index = 0U; + uint8_t m_butch_cmd_size = 0U; - cdrom_file *m_cd_file; - //const cdrom_toc* m_toc; + cdrom_file *m_cd_file = nullptr; + //const cdrom_toc* m_toc = nullptr; }; diff --git a/src/mame/includes/jailbrek.h b/src/mame/includes/jailbrek.h index b7a3aff3226..8293de3da0a 100644 --- a/src/mame/includes/jailbrek.h +++ b/src/mame/includes/jailbrek.h @@ -50,11 +50,11 @@ private: required_device m_palette; /* video-related */ - tilemap_t *m_bg_tilemap; + tilemap_t *m_bg_tilemap = nullptr; /* misc */ - uint8_t m_irq_enable; - uint8_t m_nmi_enable; + uint8_t m_irq_enable = 0U; + uint8_t m_nmi_enable = 0U; void ctrl_w(uint8_t data); void coin_w(uint8_t data); void videoram_w(offs_t offset, uint8_t data); -- cgit v1.2.3