summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2022-03-25 22:30:09 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2022-03-25 22:30:09 +1100
commit380390934c25944b83ca624b1d6857b41f5eba36 (patch)
tree1bb1f29f069eb72dcac161d2db3beb11b2297fb6 /src
parenta944f7ffdf914e22681ef25aaf882f23015e2262 (diff)
init vars for coverity (drivers/g)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/galgame.cpp20
-rw-r--r--src/mame/drivers/galgames.cpp18
-rw-r--r--src/mame/drivers/galpani3.cpp4
-rw-r--r--src/mame/drivers/galpanic_ms.cpp4
-rw-r--r--src/mame/drivers/geneve.cpp12
-rw-r--r--src/mame/drivers/geniusiq.cpp24
-rw-r--r--src/mame/drivers/ghosteo.cpp4
-rw-r--r--src/mame/drivers/giclassic.cpp4
-rw-r--r--src/mame/drivers/gkigt.cpp6
-rw-r--r--src/mame/drivers/gluck2.cpp2
-rw-r--r--src/mame/drivers/gmaster.cpp16
-rw-r--r--src/mame/drivers/goldart.cpp2
-rw-r--r--src/mame/drivers/goldnpkr.cpp10
-rw-r--r--src/mame/drivers/good.cpp4
-rw-r--r--src/mame/drivers/goodejan.cpp18
-rw-r--r--src/mame/drivers/goori.cpp2
-rw-r--r--src/mame/drivers/gp2x.cpp14
-rw-r--r--src/mame/drivers/gpworld.cpp12
-rw-r--r--src/mame/drivers/gridcomp.cpp6
-rw-r--r--src/mame/drivers/gstream.cpp2
-rw-r--r--src/mame/drivers/gticlub.cpp2
-rw-r--r--src/mame/drivers/gunpey.cpp2
22 files changed, 94 insertions, 94 deletions
diff --git a/src/mame/drivers/galgame.cpp b/src/mame/drivers/galgame.cpp
index 53fa633f66b..2cb0a664bef 100644
--- a/src/mame/drivers/galgame.cpp
+++ b/src/mame/drivers/galgame.cpp
@@ -32,23 +32,23 @@ public:
void init_galaxygame();
private:
- uint16_t m_clk;
+ uint16_t m_clk = 0;
- uint16_t m_x;
- uint16_t m_y;
+ uint16_t m_x = 0;
+ uint16_t m_y = 0;
- int16_t m_mq;
- int16_t m_ac;
+ int16_t m_mq = 0;
+ int16_t m_ac = 0;
struct
{
- uint16_t x;
- uint16_t y;
+ uint16_t x = 0;
+ uint16_t y = 0;
} m_point_work_list[MAX_POINTS], m_point_display_list[MAX_POINTS];
- int m_point_work_list_index;
- int m_point_display_list_index;
- int m_interrupt;
+ int m_point_work_list_index = 0;
+ int m_point_display_list_index = 0;
+ int m_interrupt = 0;
uint16_t ke_r(offs_t offset);
void ke_w(offs_t offset, uint16_t data);
uint16_t x_r();
diff --git a/src/mame/drivers/galgames.cpp b/src/mame/drivers/galgames.cpp
index 094f875b71a..da88c089123 100644
--- a/src/mame/drivers/galgames.cpp
+++ b/src/mame/drivers/galgames.cpp
@@ -130,8 +130,8 @@ protected:
// PIC
optional_device<pic16c5x_device> m_pic;
- u8 m_pic_iobits, m_pic_data, m_pic_data_rdy, m_pic_data_bit, m_pic_data_clk;
- u8 m_pic_clk_mask, m_pic_in_mask, m_pic_out_mask, m_pic_dis_mask;
+ u8 m_pic_iobits = 0, m_pic_data = 0, m_pic_data_rdy = 0, m_pic_data_bit = 0, m_pic_data_clk = 0;
+ u8 m_pic_clk_mask = 0, m_pic_in_mask = 0, m_pic_out_mask = 0, m_pic_dis_mask = 0;
void log_cart_comm(const char *text, u8 data);
void pic_comm_reset();
@@ -278,7 +278,7 @@ protected:
virtual space_config_vector memory_space_config() const override;
address_space_config m_space_config;
- address_space *m_space;
+ address_space *m_space = nullptr;
required_shared_ptr<u16> m_ram;
@@ -292,10 +292,10 @@ protected:
void set_cart(int cart);
void reset_eeproms_except(int cart);
- galgames_cart_device *m_carts[1+4];
+ galgames_cart_device *m_carts[1+4]{};
- u8 m_cart;
- bool m_is_ram_active;
+ u8 m_cart = 0;
+ bool m_is_ram_active = false;
};
device_memory_interface::space_config_vector galgames_slot_device::memory_space_config() const
@@ -773,9 +773,9 @@ protected:
required_device<galgames_slot_device> m_slot;
required_shared_ptr<u8> m_okiram;
- u8 m_palette_offset;
- u8 m_palette_index;
- u8 m_palette_data[3];
+ u8 m_palette_offset = 0;
+ u8 m_palette_index = 0;
+ u8 m_palette_data[3]{};
};
WRITE_LINE_MEMBER(galgames_state::blitter_irq_callback)
diff --git a/src/mame/drivers/galpani3.cpp b/src/mame/drivers/galpani3.cpp
index 3891d17393f..20f3bee9f74 100644
--- a/src/mame/drivers/galpani3.cpp
+++ b/src/mame/drivers/galpani3.cpp
@@ -106,8 +106,8 @@ private:
required_shared_ptr<uint16_t> m_sprregs;
bitmap_ind16 m_sprite_bitmap;
- uint16_t m_priority_buffer_scrollx;
- uint16_t m_priority_buffer_scrolly;
+ uint16_t m_priority_buffer_scrollx = 0;
+ uint16_t m_priority_buffer_scrolly = 0;
std::unique_ptr<uint32_t[]> m_spriteram32;
std::unique_ptr<uint32_t[]> m_spc_regs;
diff --git a/src/mame/drivers/galpanic_ms.cpp b/src/mame/drivers/galpanic_ms.cpp
index 845972e28ef..901355dc20a 100644
--- a/src/mame/drivers/galpanic_ms.cpp
+++ b/src/mame/drivers/galpanic_ms.cpp
@@ -105,12 +105,12 @@ private:
TILE_GET_INFO_MEMBER(get_tile_info_tilemap2);
- tilemap_t *m_bg_tilemap2;
+ tilemap_t *m_bg_tilemap2 = nullptr;
DECLARE_WRITE_LINE_MEMBER(splash_msm5205_int);
void splash_adpcm_data_w(uint8_t data);
void splash_adpcm_control_w(uint8_t data);
- int m_adpcm_data;
+ int m_adpcm_data = 0;
void descramble_16x16tiles(uint8_t* src, int len);
};
diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp
index f05b763394a..6f8651aa470 100644
--- a/src/mame/drivers/geneve.cpp
+++ b/src/mame/drivers/geneve.cpp
@@ -311,7 +311,7 @@ private:
required_device<pc_kbdc_device> m_kbdconn;
required_device<bus::ti99::peb::peribox_device> m_peribox;
- uint8_t* m_eprom; // Pointer to the EPROM
+ uint8_t* m_eprom = nullptr; // Pointer to the EPROM
// PFM expansion
required_device<at29c040_device> m_pfm512;
@@ -348,17 +348,17 @@ private:
virtual void machine_reset() override;
// Members
- int m_inta;
- int m_intb;
- int m_int2;
- int m_keyint;
+ int m_inta = 0;
+ int m_intb = 0;
+ int m_int2 = 0;
+ int m_keyint = 0;
int m_left_button; // Left mouse button, not wired to the 9938
int m_pfm_prefix;
bool m_pfm_oe;
// Settings
- int m_boot_rom; // Kind of boot ROM (EPROM or PFM512 or PFM512A)
+ int m_boot_rom = 0; // Kind of boot ROM (EPROM or PFM512 or PFM512A)
bool m_sram_exp;
// Genmod modifications
diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp
index 48dcc7886c7..028a605662b 100644
--- a/src/mame/drivers/geniusiq.cpp
+++ b/src/mame/drivers/geniusiq.cpp
@@ -221,20 +221,20 @@ private:
void geniusiq_mem(address_map &map);
- uint16_t m_gfx_y;
- uint16_t m_gfx_x;
- uint32_t m_gfx_base;
- uint8_t m_gfx_color[2];
- uint8_t m_mouse_posx;
- uint8_t m_mouse_posy;
- uint16_t m_mouse_gfx_posx;
- uint16_t m_mouse_gfx_posy;
- uint8_t m_cart_state;
+ uint16_t m_gfx_y = 0;
+ uint16_t m_gfx_x = 0;
+ uint32_t m_gfx_base = 0;
+ uint8_t m_gfx_color[2]{};
+ uint8_t m_mouse_posx = 0;
+ uint8_t m_mouse_posy = 0;
+ uint16_t m_mouse_gfx_posx = 0;
+ uint16_t m_mouse_gfx_posy = 0;
+ uint8_t m_cart_state = 0;
struct
{
- uint16_t buffer[KEYBOARD_QUEUE_SIZE];
- int head;
- int tail;
+ uint16_t buffer[KEYBOARD_QUEUE_SIZE]{};
+ int head = 0;
+ int tail = 0;
} m_keyboard;
};
diff --git a/src/mame/drivers/ghosteo.cpp b/src/mame/drivers/ghosteo.cpp
index c4ddf81905b..6ce3b6c92b9 100644
--- a/src/mame/drivers/ghosteo.cpp
+++ b/src/mame/drivers/ghosteo.cpp
@@ -125,8 +125,8 @@ private:
required_region_ptr<uint8_t> m_flash;
memory_bank_creator m_qs1000_bank;
- int m_security_count;
- uint32_t m_bballoon_port[20];
+ int m_security_count = 0;
+ uint32_t m_bballoon_port[20]{};
struct nand_t m_nand;
uint32_t bballoon_speedup_r(offs_t offset, uint32_t mem_mask = ~0);
uint32_t touryuu_port_10000000_r();
diff --git a/src/mame/drivers/giclassic.cpp b/src/mame/drivers/giclassic.cpp
index 99ec8888c91..db7d95e3a33 100644
--- a/src/mame/drivers/giclassic.cpp
+++ b/src/mame/drivers/giclassic.cpp
@@ -84,7 +84,7 @@ private:
void satellite_main(address_map &map);
- uint8_t m_control;
+ uint8_t m_control = 0;
};
// --------------------------------------------------------------------------------------------------------------
@@ -203,7 +203,7 @@ public:
void giclassvr(machine_config &config);
void server_main(address_map &map);
private:
- uint16_t m_control;
+ uint16_t m_control = 0;
};
void giclassicsvr_state::control_w(uint16_t data)
diff --git a/src/mame/drivers/gkigt.cpp b/src/mame/drivers/gkigt.cpp
index 5b64c9106d7..263261201af 100644
--- a/src/mame/drivers/gkigt.cpp
+++ b/src/mame/drivers/gkigt.cpp
@@ -151,9 +151,9 @@ private:
required_shared_ptr<uint32_t> m_vram;
required_device<sc28c94_device> m_quart1;
- uint8_t m_irq_enable;
- uint8_t m_irq_pend;
- uint8_t m_timer_count;
+ uint8_t m_irq_enable = 0;
+ uint8_t m_irq_pend = 0;
+ uint8_t m_timer_count = 0;
};
void igt_gameking_state::video_start()
diff --git a/src/mame/drivers/gluck2.cpp b/src/mame/drivers/gluck2.cpp
index a3b4a5362b0..d4d99826747 100644
--- a/src/mame/drivers/gluck2.cpp
+++ b/src/mame/drivers/gluck2.cpp
@@ -225,7 +225,7 @@ private:
required_shared_ptr<uint8_t> m_videoram;
required_shared_ptr<uint8_t> m_colorram;
- tilemap_t *m_bg_tilemap;
+ tilemap_t *m_bg_tilemap = nullptr;
void videoram_w(offs_t offset, uint8_t data);
void colorram_w(offs_t offset, uint8_t data);
diff --git a/src/mame/drivers/gmaster.cpp b/src/mame/drivers/gmaster.cpp
index 554dc27321c..cca9bb99908 100644
--- a/src/mame/drivers/gmaster.cpp
+++ b/src/mame/drivers/gmaster.cpp
@@ -52,16 +52,16 @@ private:
struct
{
- uint8_t data[8];
- int index;
- int x, y;
- bool mode; // true read does not increase address
- bool delayed;
- uint8_t pixels[8][64];
+ uint8_t data[8]{};
+ int index = 0;
+ int x = 0, y = 0;
+ bool mode = false; // true read does not increase address
+ bool delayed = false;
+ uint8_t pixels[8][64]{};
} m_video;
- uint8_t m_ports[5];
- uint8_t m_ram[0x4000];
+ uint8_t m_ports[5]{};
+ uint8_t m_ram[0x4000]{};
required_device<cpu_device> m_maincpu;
required_device<speaker_sound_device> m_speaker;
required_device<generic_slot_device> m_cart;
diff --git a/src/mame/drivers/goldart.cpp b/src/mame/drivers/goldart.cpp
index 07c69d227f7..ada14631051 100644
--- a/src/mame/drivers/goldart.cpp
+++ b/src/mame/drivers/goldart.cpp
@@ -83,7 +83,7 @@ private:
uint8_t m_ram[0x10000];
uint8_t m_ram2[0x10000];
- uint8_t m_port1;
+ uint8_t m_port1 = 0;
uint8_t hostmem_r(offs_t offset);
void hostmem_w(offs_t offset, uint8_t data);
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index 3ea2cd01dce..ea6d41fa5b4 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -1120,11 +1120,11 @@ private:
optional_device<ay8910_device> m_ay8910;
output_finder<5> m_lamps;
- tilemap_t *m_bg_tilemap;
- uint8_t m_mux_data;
- uint8_t m_pia0_PA_data;
- uint8_t m_ay8910_data;
- uint8_t m_ay8910_control;
+ tilemap_t *m_bg_tilemap = nullptr;
+ uint8_t m_mux_data = 0;
+ uint8_t m_pia0_PA_data = 0;
+ uint8_t m_ay8910_data = 0;
+ uint8_t m_ay8910_control = 0;
};
class blitz_state : public goldnpkr_state
diff --git a/src/mame/drivers/good.cpp b/src/mame/drivers/good.cpp
index 51eb2f91806..72b1786ba64 100644
--- a/src/mame/drivers/good.cpp
+++ b/src/mame/drivers/good.cpp
@@ -66,8 +66,8 @@ private:
required_shared_ptr<uint16_t> m_bg_tilemapram;
// video-related
- tilemap_t *m_bg_tilemap;
- tilemap_t *m_fg_tilemap;
+ tilemap_t *m_bg_tilemap = nullptr;
+ tilemap_t *m_fg_tilemap = nullptr;
void fg_tilemapram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
void bg_tilemapram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp
index 1adccf178a8..0f4f82b3ed0 100644
--- a/src/mame/drivers/goodejan.cpp
+++ b/src/mame/drivers/goodejan.cpp
@@ -120,15 +120,15 @@ private:
required_ioport_array<5> m_key;
- tilemap_t *m_sc0_tilemap;
- tilemap_t *m_sc1_tilemap;
- tilemap_t *m_sc2_tilemap;
- tilemap_t *m_sc3_tilemap;
-
- uint16_t m_mux_data;
- uint16_t m_seibucrtc_sc0bank;
- uint16_t m_layer_en;
- uint16_t m_scrollram[6];
+ tilemap_t *m_sc0_tilemap = nullptr;
+ tilemap_t *m_sc1_tilemap = nullptr;
+ tilemap_t *m_sc2_tilemap = nullptr;
+ tilemap_t *m_sc3_tilemap = nullptr;
+
+ uint16_t m_mux_data = 0;
+ uint16_t m_seibucrtc_sc0bank = 0;
+ uint16_t m_layer_en = 0;
+ uint16_t m_scrollram[6]{};
void gfxbank_w(uint16_t data);
uint16_t mahjong_panel_r();
diff --git a/src/mame/drivers/goori.cpp b/src/mame/drivers/goori.cpp
index faa5bfba137..4e4d5b5751e 100644
--- a/src/mame/drivers/goori.cpp
+++ b/src/mame/drivers/goori.cpp
@@ -102,7 +102,7 @@ private:
required_device<screen_device> m_screen;
required_device<eeprom_serial_93cxx_device> m_eeprom;
- tilemap_t* m_bg_tilemap;
+ tilemap_t* m_bg_tilemap = nullptr;
void bg_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0);
TILE_GET_INFO_MEMBER(get_bg_tile_info);
};
diff --git a/src/mame/drivers/gp2x.cpp b/src/mame/drivers/gp2x.cpp
index 7c2af984b7c..9a422e0dc9d 100644
--- a/src/mame/drivers/gp2x.cpp
+++ b/src/mame/drivers/gp2x.cpp
@@ -51,13 +51,13 @@ private:
void nand_ctrl_w(uint32_t data);
uint32_t sdcard_r();
required_shared_ptr<uint32_t> m_ram;
- uint16_t m_vidregs[0x200/2];
- uint32_t m_nand_ptr;
- uint32_t m_nand_cmd;
- uint32_t m_nand_subword_stage;
- uint32_t m_nand_stage;
- uint32_t m_nand_ptr_temp;
- uint32_t m_timer;
+ uint16_t m_vidregs[0x200/2]{};
+ uint32_t m_nand_ptr = 0;
+ uint32_t m_nand_cmd = 0;
+ uint32_t m_nand_subword_stage = 0;
+ uint32_t m_nand_stage = 0;
+ uint32_t m_nand_ptr_temp = 0;
+ uint32_t m_timer = 0;
uint32_t screen_update_gp2x(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
void gp2x_map(address_map &map);
};
diff --git a/src/mame/drivers/gpworld.cpp b/src/mame/drivers/gpworld.cpp
index 654389e5853..b5e1481cd88 100644
--- a/src/mame/drivers/gpworld.cpp
+++ b/src/mame/drivers/gpworld.cpp
@@ -71,12 +71,12 @@ public:
void init_gpworld();
private:
- uint8_t m_nmi_enable;
- uint8_t m_start_lamp;
- uint8_t m_ldp_read_latch;
- uint8_t m_ldp_write_latch;
- uint8_t m_brake_gas;
- emu_timer *m_irq_stop_timer;
+ uint8_t m_nmi_enable = 0;
+ uint8_t m_start_lamp = 0;
+ uint8_t m_ldp_read_latch = 0;
+ uint8_t m_ldp_write_latch = 0;
+ uint8_t m_brake_gas = 0;
+ emu_timer *m_irq_stop_timer = nullptr;
required_device<pioneer_ldv1000_device> m_laserdisc;
required_shared_ptr<uint8_t> m_sprite_ram;
required_shared_ptr<uint8_t> m_palette_ram;
diff --git a/src/mame/drivers/gridcomp.cpp b/src/mame/drivers/gridcomp.cpp
index 3b7c0bb294e..a94810a1488 100644
--- a/src/mame/drivers/gridcomp.cpp
+++ b/src/mame/drivers/gridcomp.cpp
@@ -158,10 +158,10 @@ private:
void grid1101_map(address_map &map);
void grid1121_map(address_map &map);
- bool m_kbd_ready;
- uint16_t m_kbd_data;
+ bool m_kbd_ready = false;
+ uint16_t m_kbd_data = 0;
- uint16_t *m_videoram;
+ uint16_t *m_videoram = nullptr;
};
diff --git a/src/mame/drivers/gstream.cpp b/src/mame/drivers/gstream.cpp
index 7a03175a29a..ec37ec2c80e 100644
--- a/src/mame/drivers/gstream.cpp
+++ b/src/mame/drivers/gstream.cpp
@@ -182,7 +182,7 @@ private:
/* misc */
int m_oki_bank[2];
int m_toggle;
- int m_xoffset;
+ int m_xoffset = 0;
void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0);
template<int Layer> void scrollx_w(uint16_t data);
diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp
index 63da6555c0b..e59ce9b37d7 100644
--- a/src/mame/drivers/gticlub.cpp
+++ b/src/mame/drivers/gticlub.cpp
@@ -339,7 +339,7 @@ private:
void sharc_map(address_map &map);
void sound_memmap(address_map &map);
- emu_timer *m_sound_irq_timer;
+ emu_timer *m_sound_irq_timer = nullptr;
#if DEBUG_GTI
uint8_t m_tick = 0;
diff --git a/src/mame/drivers/gunpey.cpp b/src/mame/drivers/gunpey.cpp
index d6b3839763d..6b61f4ac72e 100644
--- a/src/mame/drivers/gunpey.cpp
+++ b/src/mame/drivers/gunpey.cpp
@@ -303,7 +303,7 @@ private:
bool write_dest_byte(u8 usedata);
// blitter timers
- emu_timer *m_blitter_end_timer;
+ emu_timer *m_blitter_end_timer = nullptr;
TIMER_CALLBACK_MEMBER(blitter_end);
// decompressor functions