diff options
97 files changed, 293 insertions, 234 deletions
diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp index fc11b76230e..7b58d3e01cb 100644 --- a/src/devices/imagedev/cassette.cpp +++ b/src/devices/imagedev/cassette.cpp @@ -30,8 +30,15 @@ const device_type CASSETTE = &device_creator<cassette_image_device>; cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, CASSETTE, "Cassette", tag, owner, clock, "cassette_image", __FILE__), - device_image_interface(mconfig, *this), - m_state(CASSETTE_STOPPED), + device_image_interface(mconfig, *this), + m_cassette(NULL), + m_state(CASSETTE_STOPPED), + m_position(0), + m_position_time(0), + m_value(0), + m_channel(0), + m_speed(0), + m_direction(0), m_formats(cassette_default_formats), m_create_opts(NULL), m_default_state(CASSETTE_PLAY), @@ -423,7 +430,6 @@ void cassette_image_device::call_display() if (position > length) { m_state = (cassette_state)(( m_state & ~CASSETTE_MASK_UISTATE ) | CASSETTE_STOPPED); - position = length; } } } diff --git a/src/devices/imagedev/chd_cd.cpp b/src/devices/imagedev/chd_cd.cpp index b506ebfa784..429eafe4b4d 100644 --- a/src/devices/imagedev/chd_cd.cpp +++ b/src/devices/imagedev/chd_cd.cpp @@ -28,14 +28,18 @@ const device_type CDROM = &device_creator<cdrom_image_device>; cdrom_image_device::cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, CDROM, "CD-ROM Image", tag, owner, clock, "cdrom_image", __FILE__), - device_image_interface(mconfig, *this), + device_image_interface(mconfig, *this), + m_cdrom_handle(NULL), + m_extension_list(NULL), m_interface(NULL) { } cdrom_image_device::cdrom_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_image_interface(mconfig, *this), + device_image_interface(mconfig, *this), + m_cdrom_handle(NULL), + m_extension_list(NULL), m_interface(NULL) { } diff --git a/src/devices/imagedev/flopdrv.cpp b/src/devices/imagedev/flopdrv.cpp index 30537e5d190..a9639b3ce9a 100644 --- a/src/devices/imagedev/flopdrv.cpp +++ b/src/devices/imagedev/flopdrv.cpp @@ -709,11 +709,13 @@ legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mco m_rdy(0), m_dskchg(0), m_drive_id(0), - m_active(0), + m_active(0), + m_config(NULL), m_flags(0), m_max_track(0), m_num_sides(0), - m_current_track(0), + m_current_track(0), + m_index_timer(NULL), m_index_pulse_callback(NULL), m_rpm(0.0f), m_id_index(0), @@ -741,11 +743,13 @@ legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mco m_rdy(0), m_dskchg(0), m_drive_id(0), - m_active(0), + m_active(0), + m_config(NULL), m_flags(0), m_max_track(0), m_num_sides(0), - m_current_track(0), + m_current_track(0), + m_index_timer(NULL), m_index_pulse_callback(NULL), m_rpm(0.0f), m_id_index(0), diff --git a/src/devices/imagedev/flopdrv.h b/src/devices/imagedev/flopdrv.h index e2511ca9a50..4d1b4cc6800 100644 --- a/src/devices/imagedev/flopdrv.h +++ b/src/devices/imagedev/flopdrv.h @@ -161,7 +161,6 @@ private: TIMER_CALLBACK_MEMBER(floppy_drive_index_callback); void floppy_drive_init(); void floppy_drive_index_func(); - TIMER_CALLBACK(floppy_drive_index_callback); int internal_floppy_device_load(int create_format, option_resolution *create_args); TIMER_CALLBACK_MEMBER( set_wpt ); diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 827a037ac13..04ddbf627de 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -7,7 +7,6 @@ *********************************************************************/ #include "emu.h" -#include "emuopts.h" #include "ui/menu.h" #include "ui/filesel.h" #include "zippath.h" @@ -127,7 +126,8 @@ const floppy_format_type floppy_image_device::default_floppy_formats[] = { floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, FLOPPY_CONNECTOR, "Floppy drive connector abstraction", tag, owner, clock, "floppy_connector", __FILE__), - device_slot_interface(mconfig, *this), + device_slot_interface(mconfig, *this), + formats(NULL), m_enable_sound(false) { } @@ -167,10 +167,27 @@ floppy_image_device *floppy_connector::get_device() floppy_image_device::floppy_image_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), device_image_interface(mconfig, *this), - device_slot_card_interface(mconfig, *this), + device_slot_card_interface(mconfig, *this), + input_format(NULL), + output_format(NULL), image(NULL), - fif_list(NULL), - m_make_sound(false) + fif_list(NULL), + index_timer(NULL), + tracks(0), + sides(0), + form_factor(0), + motor_always_on(false), + dir(0), stp(0), wtg(0), mon(0), ss(0), idx(0), wpt(0), rdy(0), dskchg(0), + ready(false), + rpm(0), + floppy_ratio_1(0), + revolution_count(0), + cyl(0), + subcyl(0), + image_dirty(false), + ready_counter(0), + m_make_sound(false), + m_sound_out(NULL) { extension_list[0] = '\0'; m_err = IMAGE_ERROR_INVALIDIMAGE; @@ -983,7 +1000,7 @@ void ui_menu_control_floppy_image::hook_load(std::string filename, bool softlist bool can_in_place = input_format->supports_save(); if(can_in_place) { - file_error filerr = FILERR_NOT_FOUND; + file_error filerr; std::string tmp_path; core_file *tmp_file; /* attempt to open the file for writing but *without* create */ @@ -1004,8 +1021,9 @@ void ui_menu_control_floppy_image::handle() switch (state) { case DO_CREATE: { floppy_image_format_t *fif_list = fd->get_formats(); - int ext_match = 0, total_usable = 0; - for(floppy_image_format_t *i = fif_list; i; i = i->next) { + int ext_match; + int total_usable = 0; + for(floppy_image_format_t *i = fif_list; i; i = i->next) { if(!i->supports_save()) continue; if (i->extension_matches(current_file.c_str())) @@ -1085,7 +1103,22 @@ void ui_menu_control_floppy_image::handle() //=================================================================== floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__) + : samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__), + m_sound(NULL), + m_is525(false), + m_sampleindex_motor_start(0), + m_sampleindex_motor_loop(0), + m_sampleindex_motor_end(0), + m_samplesize_motor_start(0), + m_samplesize_motor_loop(0), + m_samplesize_motor_end(0), + m_samplepos_motor(0), + m_motor_playback_state(0), + m_motor_on(false), + m_step_samples(0), + m_sampleindex_step1(0), + m_samplepos_step(0), + m_step_playback_state(0) { m_loaded = false; } @@ -1193,7 +1226,7 @@ void floppy_sound_device::sound_stream_update(sound_stream &stream, stream_sampl // Also, there is no need for interpolation, as we only expect // one sample rate of 44100 for all samples - INT16 out = 0; + INT16 out; stream_sample_t *samplebuffer = outputs[0]; while (samples-- > 0) diff --git a/src/devices/imagedev/mfmhd.cpp b/src/devices/imagedev/mfmhd.cpp index 2a3099fbcde..a0dff4f2c83 100644 --- a/src/devices/imagedev/mfmhd.cpp +++ b/src/devices/imagedev/mfmhd.cpp @@ -270,7 +270,6 @@ **************************************************************************/ #include "emu.h" -#include "formats/imageutl.h" #include "harddisk.h" #include "mfmhd.h" @@ -310,7 +309,25 @@ std::string mfm_harddisk_device::tts(const attotime &t) mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source), - device_slot_card_interface(mconfig, *this) + device_slot_card_interface(mconfig, *this), + m_index_timer(NULL), + m_spinup_timer(NULL), + m_seek_timer(NULL), + m_cache_timer(NULL), + m_precomp_cyl(0), + m_redwc_cyl(0), + m_encoding(), + m_ready(false), + m_current_cylinder(0), + m_current_head(0), + m_track_delta(0), + m_step_phase(0), + m_seek_complete(false), + m_seek_inward(false), + m_autotruncation(false), + m_recalibrated(false), + m_step_line(), + m_format(NULL) { m_spinupms = 10000; m_cachelines = 5; @@ -952,7 +969,8 @@ const device_type MFMHD_ST251 = &device_creator<mfm_hd_st251_device>; // This is a write-back LRU cache. // =========================================================== -mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine): +mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine): + m_mfmhd(NULL), m_tracks(NULL), m_machine(machine) { @@ -1026,9 +1044,9 @@ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int { if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache init; cache size is %d tracks\n", mfmhd->tag(), trackslots); - chd_error state = CHDERR_NONE; + chd_error state; - mfmhd_trackimage* previous = NULL; + mfmhd_trackimage* previous; mfmhd_trackimage* current = NULL; m_mfmhd = mfmhd; @@ -1141,7 +1159,11 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head) mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock): device_t(mconfig, MFM_HD_CONNECTOR, "MFM hard disk connector", tag, owner, clock, "mfm_hd_connector", __FILE__), - device_slot_interface(mconfig, *this) + device_slot_interface(mconfig, *this), + m_encoding(), + m_spinupms(0), + m_cachesize(0), + m_format(NULL) { } diff --git a/src/devices/imagedev/mfmhd.h b/src/devices/imagedev/mfmhd.h index 85450f23bbb..7be3dc8c1cb 100644 --- a/src/devices/imagedev/mfmhd.h +++ b/src/devices/imagedev/mfmhd.h @@ -154,7 +154,6 @@ private: mfmhd_trackimage_cache* m_cache; mfmhd_image_format_t* m_format; - void prepare_track(int cylinder, int head); void head_move(); void recalibrate(); diff --git a/src/devices/imagedev/midiin.cpp b/src/devices/imagedev/midiin.cpp index e412409aa38..3f2c22d7c99 100644 --- a/src/devices/imagedev/midiin.cpp +++ b/src/devices/imagedev/midiin.cpp @@ -24,9 +24,14 @@ const device_type MIDIIN = &device_creator<midiin_device>; midiin_device::midiin_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MIDIIN, "MIDI In image device", tag, owner, clock, "midiin", __FILE__), - device_image_interface(mconfig, *this), - device_serial_interface(mconfig, *this), - m_input_cb(*this) + device_image_interface(mconfig, *this), + device_serial_interface(mconfig, *this), + m_midi(NULL), + m_timer(NULL), + m_input_cb(*this), + m_xmit_read(0), + m_xmit_write(0), + m_tx_busy(false) { } diff --git a/src/devices/imagedev/midiout.cpp b/src/devices/imagedev/midiout.cpp index 97ecb36ab89..86c446fa6b4 100644 --- a/src/devices/imagedev/midiout.cpp +++ b/src/devices/imagedev/midiout.cpp @@ -24,8 +24,9 @@ const device_type MIDIOUT = &device_creator<midiout_device>; midiout_device::midiout_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MIDIOUT, "MIDI Out image device", tag, owner, clock, "midiout", __FILE__), - device_image_interface(mconfig, *this), - device_serial_interface(mconfig, *this) + device_image_interface(mconfig, *this), + device_serial_interface(mconfig, *this), + m_midi(NULL) { } diff --git a/src/devices/machine/keyboard.cpp b/src/devices/machine/keyboard.cpp index 03d538f2a3e..30d3d528e93 100644 --- a/src/devices/machine/keyboard.cpp +++ b/src/devices/machine/keyboard.cpp @@ -43,7 +43,10 @@ generic_keyboard_device::generic_keyboard_device(const machine_config &mconfig, m_io_kbd7(*this, "TERM_LINE7"), m_io_kbd8(*this, "TERM_LINE8"), m_io_kbd9(*this, "TERM_LINE9"), - m_io_kbdc(*this, "TERM_LINEC"), + m_io_kbdc(*this, "TERM_LINEC"), + m_timer(NULL), + m_last_code(0), + m_scan_line(0), m_keyboard_cb(*this) { } @@ -61,6 +64,9 @@ generic_keyboard_device::generic_keyboard_device(const machine_config &mconfig, m_io_kbd8(*this, "TERM_LINE8"), m_io_kbd9(*this, "TERM_LINE9"), m_io_kbdc(*this, "TERM_LINEC"), + m_timer(NULL), + m_last_code(0), + m_scan_line(0), m_keyboard_cb(*this) { } diff --git a/src/devices/machine/legscsi.cpp b/src/devices/machine/legscsi.cpp index 4071ccf8c3a..21e635bd1d8 100644 --- a/src/devices/machine/legscsi.cpp +++ b/src/devices/machine/legscsi.cpp @@ -3,7 +3,8 @@ #include "legscsi.h" legacy_scsi_host_adapter::legacy_scsi_host_adapter(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : - device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + m_selected(0), m_scsi_port(*this) { } diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp index 3a92aa48c1b..815ec477ba4 100644 --- a/src/devices/machine/ram.cpp +++ b/src/devices/machine/ram.cpp @@ -78,8 +78,8 @@ void ram_device::device_validity_check(validity_checker &valid) const { const char *ramsize_string = NULL; int is_valid = FALSE; - UINT32 specified_ram = 0; - const char *gamename_option = NULL; + UINT32 specified_ram; + const char *gamename_option; /* verify default ram value */ if (default_size() == 0) @@ -183,7 +183,7 @@ UINT32 ram_device::parse_string(const char *s) UINT32 ram; char suffix = '\0'; - s += sscanf(s, "%u%c", &ram, &suffix); + sscanf(s, "%u%c", &ram, &suffix); switch(tolower(suffix)) { diff --git a/src/devices/machine/terminal.cpp b/src/devices/machine/terminal.cpp index f46bcd3156e..081266f801d 100644 --- a/src/devices/machine/terminal.cpp +++ b/src/devices/machine/terminal.cpp @@ -143,16 +143,22 @@ static const UINT8 terminal_font[256*16] = generic_terminal_device::generic_terminal_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), m_palette(*this, "palette"), - m_io_term_conf(*this, "TERM_CONF"), + m_io_term_conf(*this, "TERM_CONF"), + m_x_pos(0), + m_framecnt(0), + m_y_pos(0), m_keyboard_cb(*this) { } generic_terminal_device::generic_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, GENERIC_TERMINAL, "Generic Terminal", tag, owner, clock, "generic_terminal", __FILE__), - m_palette(*this, "palette"), - m_io_term_conf(*this, "TERM_CONF"), - m_keyboard_cb(*this) + m_palette(*this, "palette"), + m_io_term_conf(*this, "TERM_CONF"), + m_x_pos(0), + m_framecnt(0), + m_y_pos(0), + m_keyboard_cb(*this) { } diff --git a/src/devices/sound/samples.cpp b/src/devices/sound/samples.cpp index 964c21e2b22..279eada7a1f 100644 --- a/src/devices/sound/samples.cpp +++ b/src/devices/sound/samples.cpp @@ -363,7 +363,6 @@ void samples_device::sound_stream_update(sound_stream &stream, stream_sample_t * chan.source_num = -1; if (samples > 0) memset(buffer, 0, samples * sizeof(*buffer)); - samples = 0; break; } } diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h index 958c69a934d..c73fcbd3829 100644 --- a/src/devices/video/poly.h +++ b/src/devices/video/poly.h @@ -656,9 +656,9 @@ UINT32 poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::render_trian v3 = tv; if (v2->y < v1->y) { - const vertex_t *tv = v1; + const vertex_t *tv2 = v1; v1 = v2; - v2 = tv; + v2 = tv2; } } diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index 83bcbaaadac..f989f43dc4a 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -29,7 +29,8 @@ address_map_entry::address_map_entry(device_t &device, address_map &map, offs_t m_addrmask(0), m_share(NULL), m_region(NULL), - m_rgnoffs(0), + m_rgnoffs(0), + m_submap_bits(0), m_memory(NULL), m_bytestart(0), m_byteend(0), diff --git a/src/emu/audit.cpp b/src/emu/audit.cpp index 8f13a2a5d86..758bb508db0 100644 --- a/src/emu/audit.cpp +++ b/src/emu/audit.cpp @@ -270,8 +270,8 @@ media_auditor::summary media_auditor::audit_samples() int found = 0; // iterate over sample entries - samples_device_iterator iter(m_enumerator.config().root_device()); - for (samples_device *device = iter.first(); device != NULL; device = iter.next()) + samples_device_iterator iterator(m_enumerator.config().root_device()); + for (samples_device *device = iterator.first(); device != NULL; device = iterator.next()) { // by default we just search using the driver name std::string searchpath(m_enumerator.driver().name); diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp index 8993c9a095e..6be96923e65 100644 --- a/src/emu/debug/debugcmd.cpp +++ b/src/emu/debug/debugcmd.cpp @@ -1353,7 +1353,7 @@ static void execute_wpset(running_machine &machine, int ref, int params, const c address_space *space; const char *action = NULL; UINT64 address, length; - int type = 0; + int type; int wpnum; /* CPU is implicit */ @@ -1830,7 +1830,7 @@ static void execute_dump(running_machine &machine, int ref, int params, const ch { UINT64 offset, endoffset, length, width = 0, ascii = 1; address_space *space; - FILE *f = NULL; + FILE *f; UINT64 i, j; /* validate parameters */ @@ -1984,8 +1984,6 @@ static void execute_cheatinit(running_machine &machine, int ref, int params, con /* initialize entire memory by default */ if (params <= 1) { - offset = 0; - length = space->bytemask() + 1; for (entry = space->map()->m_entrylist.first(); entry != NULL; entry = entry->next()) { cheat_region[region_count].offset = space->address_to_byte(entry->m_addrstart) & space->bytemask(); @@ -2456,7 +2454,7 @@ static void execute_dasm(running_machine &machine, int ref, int params, const ch UINT64 offset, length, bytes = 1; int minbytes, maxbytes, byteswidth; address_space *space, *decrypted_space; - FILE *f = NULL; + FILE *f; int j; /* validate parameters */ diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp index e2bda0b6af2..06a878b3367 100644 --- a/src/emu/debug/debugcon.cpp +++ b/src/emu/debug/debugcon.cpp @@ -11,7 +11,6 @@ #include "emu.h" #include "debugcon.h" #include "debugcpu.h" -#include "debughlp.h" #include "debugvw.h" #include "textbuf.h" #include "debugger.h" @@ -270,7 +269,7 @@ static CMDERR internal_parse_command(running_machine &machine, const char *origi { char command[MAX_COMMAND_LENGTH], parens[MAX_COMMAND_LENGTH]; char *params[MAX_COMMAND_PARAMS] = { 0 }; - CMDERR result = CMDERR_NONE; + CMDERR result; char *command_start; char *p, c = 0; diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp index 37d451ca0fb..872ad498e7e 100644 --- a/src/emu/debug/debugcpu.cpp +++ b/src/emu/debug/debugcpu.cpp @@ -12,7 +12,6 @@ #include "emuopts.h" #include "osdepend.h" #include "debugcpu.h" -#include "debugcmd.h" #include "debugcon.h" #include "express.h" #include "debugvw.h" diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index d04b48b162a..4fd2a576750 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -17,9 +17,7 @@ #include "dvmemory.h" #include "dvbpoints.h" #include "dvwpoints.h" -#include "debugcmd.h" #include "debugcpu.h" -#include "debugcon.h" #include <ctype.h> diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h index 248379eab3c..c813619aaa1 100644 --- a/src/emu/debug/debugvw.h +++ b/src/emu/debug/debugvw.h @@ -162,7 +162,6 @@ public: const simple_list<debug_view_source> &source_list() const { return m_source_list; } // setters - void set_size(int width, int height); void set_visible_size(debug_view_xy size); void set_visible_position(debug_view_xy pos); void set_cursor_position(debug_view_xy pos); diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h index e3d743169a5..1628a9052e2 100644 --- a/src/emu/debug/dvmemory.h +++ b/src/emu/debug/dvmemory.h @@ -11,9 +11,6 @@ #ifndef __DVMEMORY_H__ #define __DVMEMORY_H__ -#include "dvstate.h" - - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp index a37a7796f5f..4dbe76202b7 100644 --- a/src/emu/debug/express.cpp +++ b/src/emu/debug/express.cpp @@ -1105,7 +1105,7 @@ void parsed_expression::parse_memory_operator(parse_token &token, const char *st throw expression_error(expression_error::INVALID_TOKEN, token.offset()); // convert the space to flags - expression_space memspace = EXPSPACE_INVALID; + expression_space memspace; switch (space) { case 'p': memspace = physical ? EXPSPACE_PROGRAM_PHYSICAL : EXPSPACE_PROGRAM_LOGICAL; break; @@ -1219,7 +1219,7 @@ void parsed_expression::infix_to_postfix() // loop over all the original tokens parse_token *prev = NULL; - parse_token *next = NULL; + parse_token *next; for (parse_token *token = m_tokenlist.detach_all(); token != NULL; prev = token, token = next) { // pre-determine our next token diff --git a/src/emu/debugger.cpp b/src/emu/debugger.cpp index 9ad47970b0b..d4ddd241389 100644 --- a/src/emu/debugger.cpp +++ b/src/emu/debugger.cpp @@ -13,7 +13,6 @@ #include "debug/debugcpu.h" #include "debug/debugcmd.h" #include "debug/debugcon.h" -#include "debug/express.h" #include "debug/debugvw.h" #include <ctype.h> diff --git a/src/emu/devcb.cpp b/src/emu/devcb.cpp index 5a0b4d69e44..aa69ce9e7d1 100644 --- a/src/emu/devcb.cpp +++ b/src/emu/devcb.cpp @@ -108,7 +108,8 @@ void devcb_base::resolve_space() //------------------------------------------------- devcb_read_base::devcb_read_base(device_t &device, UINT64 defmask) - : devcb_base(device, defmask) + : devcb_base(device, defmask), + m_adapter(NULL) { } @@ -335,7 +336,8 @@ UINT64 devcb_read_base::read_constant_adapter(address_space &space, offs_t offse //------------------------------------------------- devcb_write_base::devcb_write_base(device_t &device, UINT64 defmask) - : devcb_base(device, defmask) + : devcb_base(device, defmask), + m_adapter(NULL) { } diff --git a/src/emu/devcpu.cpp b/src/emu/devcpu.cpp index d67752d68a6..00bac6ed1b0 100644 --- a/src/emu/devcpu.cpp +++ b/src/emu/devcpu.cpp @@ -9,7 +9,6 @@ ***************************************************************************/ #include "emu.h" -#include "debugger.h" #include <ctype.h> diff --git a/src/emu/devfind.cpp b/src/emu/devfind.cpp index c7ac9c509ff..0f6ee0a3a77 100644 --- a/src/emu/devfind.cpp +++ b/src/emu/devfind.cpp @@ -40,7 +40,7 @@ finder_base::~finder_base() // find_memregion - find memory region //------------------------------------------------- -void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) +void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) const { // look up the region and return NULL if not found memory_region *region = m_base.memregion(m_tag); diff --git a/src/emu/devfind.h b/src/emu/devfind.h index e268bc9784a..3251738c5b2 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -53,7 +53,7 @@ public: protected: // helpers - void *find_memregion(UINT8 width, size_t &length, bool required); + void *find_memregion(UINT8 width, size_t &length, bool required) const; void *find_memshare(UINT8 width, size_t &bytes, bool required); bool report_missing(bool found, const char *objname, bool required); @@ -80,7 +80,8 @@ public: // operators to make use transparent operator _ObjectClass *() const { return m_target; } - _ObjectClass *operator->() const { assert(m_target != NULL); return m_target; } + + virtual _ObjectClass *operator->() const { assert(m_target != NULL); return m_target; } // getter for explicit fetching _ObjectClass *target() const { return m_target; } diff --git a/src/emu/device.h b/src/emu/device.h index cde81b237c5..5e10488d696 100644 --- a/src/emu/device.h +++ b/src/emu/device.h @@ -198,8 +198,8 @@ public: // debugging device_debug *debug() const { return m_debug; } - offs_t safe_pc(); - offs_t safe_pcbase(); + offs_t safe_pc() const; + offs_t safe_pcbase() const; void set_default_bios(UINT8 bios) { m_default_bios = bios; } void set_system_bios(UINT8 bios) { m_system_bios = bios; } diff --git a/src/emu/diexec.h b/src/emu/diexec.h index 0863924d974..cd0e0f947e4 100644 --- a/src/emu/diexec.h +++ b/src/emu/diexec.h @@ -166,12 +166,12 @@ public: void set_input_line(int linenum, int state) { m_input[linenum].set_state_synced(state); } void set_input_line_vector(int linenum, int vector) { m_input[linenum].set_vector(vector); } void set_input_line_and_vector(int linenum, int state, int vector) { m_input[linenum].set_state_synced(state, vector); } - int input_state(int linenum) { return m_input[linenum].m_curstate; } + int input_state(int linenum) const { return m_input[linenum].m_curstate; } // suspend/resume void suspend(UINT32 reason, bool eatcycles); void resume(UINT32 reason); - bool suspended(UINT32 reason = SUSPEND_ANY_REASON) { return (m_nextsuspend & reason) != 0; } + bool suspended(UINT32 reason = SUSPEND_ANY_REASON) const { return (m_nextsuspend & reason) != 0; } void yield() { suspend(SUSPEND_REASON_TIMESLICE, false); } void spin() { suspend(SUSPEND_REASON_TIMESLICE, true); } void spin_until_trigger(int trigid) { suspend_until_trigger(trigid, true); } @@ -195,9 +195,6 @@ public: device_execute_interface &execute() { return *this; } protected: - // internal helpers - void run_thread_wrapper(); - // clock and cycle information getters virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const; virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const; diff --git a/src/emu/digfx.cpp b/src/emu/digfx.cpp index 47d9646eb67..933dd5a72c5 100644 --- a/src/emu/digfx.cpp +++ b/src/emu/digfx.cpp @@ -22,7 +22,8 @@ device_gfx_interface::device_gfx_interface(const machine_config &mconfig, device_t &device, const gfx_decode_entry *gfxinfo, const char *palette_tag) - : device_interface(device, "gfx"), + : device_interface(device, "gfx"), + m_palette(NULL), m_gfxdecodeinfo(gfxinfo), m_palette_tag(palette_tag), m_palette_is_sibling(palette_tag == NULL), diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp index 9a62108c1ff..87a6b10797b 100644 --- a/src/emu/diimage.cpp +++ b/src/emu/diimage.cpp @@ -14,8 +14,6 @@ #include "ui/ui.h" #include "ui/menu.h" #include "zippath.h" -#include "ui/filesel.h" -#include "ui/swlist.h" #include "ui/imgcntrl.h" #include "softlist.h" #include "image.h" @@ -57,12 +55,18 @@ const image_device_type_info device_image_interface::m_device_info_array[] = device_image_interface::device_image_interface(const machine_config &mconfig, device_t &device) : device_interface(device, "image"), + m_err(), m_file(NULL), m_mame_file(NULL), m_software_info_ptr(NULL), - m_software_part_ptr(NULL), + m_software_part_ptr(NULL), + m_supported(0), m_readonly(false), - m_created(false), + m_created(false), + m_init_phase(false), + m_from_swlist(false), + m_create_format(0), + m_create_args(NULL), m_is_loading(FALSE) { } @@ -575,8 +579,8 @@ bool device_image_interface::is_loaded() image_error_t device_image_interface::load_image_by_path(UINT32 open_flags, const char *path) { - file_error filerr = FILERR_NOT_FOUND; - image_error_t err = IMAGE_ERROR_FILENOTFOUND; + file_error filerr; + image_error_t err; std::string revised_path; /* attempt to read the file */ @@ -629,8 +633,8 @@ int device_image_interface::reopen_for_write(const char *path) if(m_file) core_fclose(m_file); - file_error filerr = FILERR_NOT_FOUND; - image_error_t err = IMAGE_ERROR_FILENOTFOUND; + file_error filerr; + image_error_t err; std::string revised_path; /* attempt to open the file for writing*/ diff --git a/src/emu/diimage.h b/src/emu/diimage.h index 63d01249aa3..b2aa398396a 100644 --- a/src/emu/diimage.h +++ b/src/emu/diimage.h @@ -253,7 +253,6 @@ protected: void setup_working_directory(); bool try_change_working_directory(const char *subdir); - int read_hash_config(const char *sysname); void run_hash(void (*partialhash)(hash_collection &, const unsigned char *, unsigned long, const char *), hash_collection &hashes, const char *types); void image_checkhash(); void update_names(const device_type device_type = NULL, const char *inst = NULL, const char *brief = NULL); diff --git a/src/emu/dinetwork.cpp b/src/emu/dinetwork.cpp index fc411c6529c..26acbfcf479 100644 --- a/src/emu/dinetwork.cpp +++ b/src/emu/dinetwork.cpp @@ -16,7 +16,7 @@ device_network_interface::~device_network_interface() { } -int device_network_interface::send(UINT8 *buf, int len) +int device_network_interface::send(UINT8 *buf, int len) const { if(!m_dev) return 0; return m_dev->send(buf, len); diff --git a/src/emu/dinetwork.h b/src/emu/dinetwork.h index db85e456fce..b2ae35c8497 100644 --- a/src/emu/dinetwork.h +++ b/src/emu/dinetwork.h @@ -19,7 +19,7 @@ public: bool get_promisc() { return m_promisc; } int get_interface() { return m_intf; } - int send(UINT8 *buf, int len); + int send(UINT8 *buf, int len) const; virtual void recv_cb(UINT8 *buf, int len); protected: diff --git a/src/emu/dioutput.cpp b/src/emu/dioutput.cpp index cf222f7a477..54633f3acbd 100644 --- a/src/emu/dioutput.cpp +++ b/src/emu/dioutput.cpp @@ -35,7 +35,7 @@ device_output_interface::~device_output_interface() { } -void device_output_interface::set_output_value(int value) +void device_output_interface::set_output_value(int value) const { if (m_output_name) output_set_value(m_output_name, value); @@ -43,7 +43,7 @@ void device_output_interface::set_output_value(int value) fatalerror("Output name not set!"); } -void device_output_interface::set_led_value(int value) +void device_output_interface::set_led_value(int value) const { if (m_output_name) output_set_value(m_output_name, value); @@ -51,7 +51,7 @@ void device_output_interface::set_led_value(int value) output_set_led_value(m_output_index, value); } -void device_output_interface::set_lamp_value(int value) +void device_output_interface::set_lamp_value(int value) const { if (m_output_name) output_set_value(m_output_name, value); @@ -59,7 +59,7 @@ void device_output_interface::set_lamp_value(int value) output_set_lamp_value(m_output_index, value); } -void device_output_interface::set_digit_value(int value) +void device_output_interface::set_digit_value(int value) const { if (m_output_name) output_set_value(m_output_name, value); diff --git a/src/emu/dioutput.h b/src/emu/dioutput.h index ba00ac4804d..94528671ad9 100644 --- a/src/emu/dioutput.h +++ b/src/emu/dioutput.h @@ -47,10 +47,10 @@ public: static void set_output_index(device_t &device, int index) { dynamic_cast<device_output_interface &>(device).m_output_index = index; } static void set_output_name(device_t &device, const char *name) { dynamic_cast<device_output_interface &>(device).m_output_name = name; } - void set_output_value(int value); - void set_led_value(int value); - void set_lamp_value(int value); - void set_digit_value(int value); + void set_output_value(int value) const; + void set_led_value(int value) const; + void set_lamp_value(int value) const; + void set_digit_value(int value) const; protected: int m_output_index; diff --git a/src/emu/dipty.cpp b/src/emu/dipty.cpp index f0637abb0fe..97533eae976 100644 --- a/src/emu/dipty.cpp +++ b/src/emu/dipty.cpp @@ -53,7 +53,7 @@ bool device_pty_interface::is_open(void) const return m_opened; } -ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count) +ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count) const { UINT32 actual_bytes; @@ -64,7 +64,7 @@ ssize_t device_pty_interface::read(UINT8 *rx_chars , size_t count) } } -void device_pty_interface::write(UINT8 tx_char) +void device_pty_interface::write(UINT8 tx_char) const { UINT32 actual_bytes; diff --git a/src/emu/dipty.h b/src/emu/dipty.h index 8df192efcca..4efa39fa702 100644 --- a/src/emu/dipty.h +++ b/src/emu/dipty.h @@ -29,8 +29,8 @@ public: bool is_open(void) const; - ssize_t read(UINT8 *rx_chars , size_t count); - void write(UINT8 tx_char); + ssize_t read(UINT8 *rx_chars , size_t count) const; + void write(UINT8 tx_char) const; bool is_slave_connected(void) const; diff --git a/src/emu/dirtc.h b/src/emu/dirtc.h index 0afb7910073..758157233ea 100644 --- a/src/emu/dirtc.h +++ b/src/emu/dirtc.h @@ -55,8 +55,8 @@ public: void set_current_time(running_machine &machine); protected: - UINT8 convert_to_bcd(int val); - int bcd_to_integer(UINT8 val); + static UINT8 convert_to_bcd(int val); + static int bcd_to_integer(UINT8 val); void set_clock_register(int register, int value); int get_clock_register(int register); diff --git a/src/emu/diserial.cpp b/src/emu/diserial.cpp index d21374cbc09..9fce5064a90 100644 --- a/src/emu/diserial.cpp +++ b/src/emu/diserial.cpp @@ -19,10 +19,14 @@ device_serial_interface::device_serial_interface(const machine_config &mconfig, m_rcv_register_data(0x8000), m_rcv_flags(0), m_rcv_bit_count_received(0), - m_rcv_bit_count(0), + m_rcv_bit_count(0), + m_rcv_byte_received(0), m_rcv_framing_error(false), m_rcv_parity_error(false), - m_tra_flags(TRANSMIT_REGISTER_EMPTY), + m_tra_register_data(0), + m_tra_flags(TRANSMIT_REGISTER_EMPTY), + m_tra_bit_count_transmitted(0), + m_tra_bit_count(0), m_rcv_clock(NULL), m_tra_clock(NULL), m_rcv_rate(attotime::never), diff --git a/src/emu/dislot.cpp b/src/emu/dislot.cpp index e0c07d206f1..7a6d2471d6e 100644 --- a/src/emu/dislot.cpp +++ b/src/emu/dislot.cpp @@ -20,8 +20,9 @@ device_slot_interface::~device_slot_interface() { } -device_slot_option::device_slot_option(const char *name, const device_type &devtype): - m_name(name), +device_slot_option::device_slot_option(const char *name, const device_type &devtype): + m_next(NULL), + m_name(name), m_devtype(devtype), m_selectable(true), m_default_bios(NULL), diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp index 94c92a62de1..e6c68737e0f 100644 --- a/src/emu/disound.cpp +++ b/src/emu/disound.cpp @@ -194,8 +194,8 @@ void device_sound_interface::set_output_gain(int outputnum, float gain) { for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next()) if (&stream->device() == &device()) - for (int outputnum = 0; outputnum < stream->output_count(); outputnum++) - stream->set_output_gain(outputnum, gain); + for (int num = 0; num < stream->output_count(); num++) + stream->set_output_gain(num, gain); } // look up the stream and stream output index diff --git a/src/emu/distate.cpp b/src/emu/distate.cpp index 79ec37e422b..450fe412259 100644 --- a/src/emu/distate.cpp +++ b/src/emu/distate.cpp @@ -146,7 +146,7 @@ void device_state_entry::format_from_mask() UINT64 device_state_entry::value() const { // pick up the value - UINT64 result = ~(UINT64)0; + UINT64 result; switch (m_datasize) { default: @@ -172,7 +172,7 @@ std::string &device_state_entry::format(std::string &dest, const char *string, b bool leadzero = false; bool percent = false; bool explicitsign = false; - bool hitnonzero = false; + bool hitnonzero; bool reset = true; int width = 0; for (const char *fptr = m_format.c_str(); *fptr != 0; fptr++) diff --git a/src/emu/distate.h b/src/emu/distate.h index 352a3c1337d..b8adb436f1c 100644 --- a/src/emu/distate.h +++ b/src/emu/distate.h @@ -195,7 +195,7 @@ typedef device_interface_iterator<device_state_interface> state_interface_iterat // or 0 if no state object exists //------------------------------------------------- -inline offs_t device_t::safe_pc() +inline offs_t device_t::safe_pc() const { return (m_state != NULL) ? m_state->pc() : 0; } @@ -206,7 +206,7 @@ inline offs_t device_t::safe_pc() // base or 0 if no state object exists //------------------------------------------------- -inline offs_t device_t::safe_pcbase() +inline offs_t device_t::safe_pcbase() const { return (m_state != NULL) ? m_state->pcbase() : 0; } diff --git a/src/emu/drawgfxm.h b/src/emu/drawgfxm.h index 4bd555c907d..4a310ca4839 100644 --- a/src/emu/drawgfxm.h +++ b/src/emu/drawgfxm.h @@ -50,9 +50,6 @@ #ifndef __DRAWGFXM_H__ #define __DRAWGFXM_H__ -#include "profiler.h" - - /* special priority type meaning "none" */ struct NO_PRIORITY { char dummy[3]; }; diff --git a/src/emu/drivenum.cpp b/src/emu/drivenum.cpp index 857c4bab3fb..62fffe13d40 100644 --- a/src/emu/drivenum.cpp +++ b/src/emu/drivenum.cpp @@ -395,7 +395,7 @@ void driver_enumerator::find_approximate_matches(const char *string, int count, // we're done with it //------------------------------------------------- -void driver_enumerator::release_current() +void driver_enumerator::release_current() const { // skip if no current entry if (m_current < 0 || m_current >= s_driver_count) diff --git a/src/emu/drivenum.h b/src/emu/drivenum.h index 096d8b873a1..e2c7d65a58f 100644 --- a/src/emu/drivenum.h +++ b/src/emu/drivenum.h @@ -117,7 +117,7 @@ public: private: // internal helpers - void release_current(); + void release_current() const; // entry in the config cache struct config_entry diff --git a/src/emu/drivers/testcpu.cpp b/src/emu/drivers/testcpu.cpp index d3d077f025b..04260578fc2 100644 --- a/src/emu/drivers/testcpu.cpp +++ b/src/emu/drivers/testcpu.cpp @@ -32,7 +32,8 @@ public: testcpu_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_cpu(*this, "maincpu"), - m_ram(*this, "ram") + m_ram(*this, "ram"), + m_space(NULL) { } diff --git a/src/emu/emualloc.cpp b/src/emu/emualloc.cpp index 566176ce39a..02642b44922 100644 --- a/src/emu/emualloc.cpp +++ b/src/emu/emualloc.cpp @@ -9,7 +9,6 @@ ***************************************************************************/ #include "emucore.h" -#include "coreutil.h" //************************************************************************** diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp index b1bda17bc98..a7673d12447 100644 --- a/src/emu/emupal.cpp +++ b/src/emu/emupal.cpp @@ -24,15 +24,20 @@ palette_device::palette_device(const machine_config &mconfig, const char *tag, d m_entries(0), m_indirect_entries(0), m_enable_shadows(0), - m_enable_hilights(0), - m_membits_supplied(false), + m_enable_hilights(0), + m_membits(0), + m_membits_supplied(false), + m_endianness(), m_endianness_supplied(false), m_raw_to_rgb(raw_to_rgb_converter()), m_palette(NULL), - m_pens(NULL), + m_pens(NULL), + m_format(), m_shadow_table(NULL), m_shadow_group(0), - m_hilight_group(0), + m_hilight_group(0), + m_white_pen(0), + m_black_pen(0), m_init(palette_init_delegate()) { } diff --git a/src/emu/hashfile.cpp b/src/emu/hashfile.cpp index ff667fd5ac4..692e126413f 100644 --- a/src/emu/hashfile.cpp +++ b/src/emu/hashfile.cpp @@ -540,7 +540,7 @@ const char *extra_info = NULL; bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result) { hash_file *hashfile = NULL; - const hash_info *info = NULL; + const hash_info *info; /* open the hash file */ hashfile = hashfile_open(image.device().mconfig().options(), sysname, FALSE, NULL); diff --git a/src/emu/input.cpp b/src/emu/input.cpp index 01469566a63..4e9bbeb073a 100644 --- a/src/emu/input.cpp +++ b/src/emu/input.cpp @@ -843,7 +843,7 @@ input_item_id input_device::add_item(const char *name, input_item_id itemid, ite assert(m_item[itemid] == NULL); // determine the class and create the appropriate item class - input_device_item *item = NULL; + input_device_item *item; switch (m_class.standard_item_class(originalid)) { case ITEM_CLASS_SWITCH: diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp index 5c0224aa77c..70876ee974c 100644 --- a/src/emu/ioport.cpp +++ b/src/emu/ioport.cpp @@ -97,7 +97,6 @@ #include "profiler.h" #include "ui/ui.h" #include "uiinput.h" -#include "debug/debugcon.h" #include "osdepend.h" @@ -727,7 +726,8 @@ void input_type_entry::restore_default_seq() //------------------------------------------------- digital_joystick::digital_joystick(int player, int number) - : m_player(player), + : m_next(NULL), + m_player(player), m_number(number), m_current(0), m_current4way(0), @@ -2454,7 +2454,11 @@ ioport_manager::ioport_manager(running_machine &machine) m_record_file(machine.options().input_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS), m_playback_file(machine.options().input_directory(), OPEN_FLAG_READ), m_playback_accumulated_speed(0), - m_playback_accumulated_frames(0) + m_playback_accumulated_frames(0), + m_has_configs(false), + m_has_analog(false), + m_has_dips(false), + m_has_bioses(false) { memset(m_type_to_entry, 0, sizeof(m_type_to_entry)); } @@ -3233,9 +3237,9 @@ void ioport_manager::save_default_inputs(xml_data_node *parentnode) xml_set_attribute(portnode, "type", input_type_to_token(tempstr, entry->type(), entry->player())); // add only the sequences that have changed from the defaults - for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; seqtype++) - if (entry->seq(seqtype) != entry->defseq(seqtype)) - save_sequence(portnode, seqtype, entry->type(), entry->seq(seqtype)); + for (input_seq_type type = SEQ_TYPE_STANDARD; type < SEQ_TYPE_TOTAL; type++) + if (entry->seq(type) != entry->defseq(type)) + save_sequence(portnode, type, entry->type(), entry->seq(type)); } } } diff --git a/src/emu/ioport.h b/src/emu/ioport.h index 6531bda50af..5eeedb9a792 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1394,7 +1394,6 @@ public: int count_players() const; bool crosshair_position(int player, float &x, float &y); bool has_keyboard() const; - void setup_natural_keyboard(ioport_queue_chars_delegate queue_chars, ioport_accept_char_delegate accept_char, ioport_charqueue_empty_delegate charqueue_empty); INT32 frame_interpolate(INT32 oldval, INT32 newval); ioport_type token_to_input_type(const char *string, int &player) const; const char *input_type_to_token(std::string &str, ioport_type type, int player); diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp index 989cb78f72b..84a215fd16e 100644 --- a/src/emu/luaengine.cpp +++ b/src/emu/luaengine.cpp @@ -13,8 +13,6 @@ #include "luabridge/Source/LuaBridge/LuaBridge.h" #include <signal.h> #include "emu.h" -#include "emuopts.h" -#include "osdepend.h" #include "drivenum.h" #include "ui/ui.h" #include "luaengine.h" @@ -838,7 +836,7 @@ void lua_engine::serve_lua() osd_lock_release(lock); // Wait for response - int done = 0; + int done; do { osd_sleep(osd_ticks_per_second() / 1000); osd_lock_acquire(lock); diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 9562d4aa32f..346f907c0a7 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -75,12 +75,9 @@ #include "debugger.h" #include "render.h" #include "cheat.h" -#include "ui/selgame.h" #include "uiinput.h" #include "crsshair.h" -#include "validity.h" #include "unzip.h" -#include "debug/debugcon.h" #include "debug/debugvw.h" #include "image.h" #include "luaengine.h" @@ -322,9 +319,9 @@ device_t &running_machine::add_dynamic_device(device_t &owner, device_type type, // notify this device and all its subdevices that they are now configured device_iterator iter(root_device()); - for (device_t *device = iter.first(); device != NULL; device = iter.next()) - if (!device->configured()) - device->config_complete(); + for (device_t *dev = iter.first(); dev != NULL; dev = iter.next()) + if (!dev->configured()) + dev->config_complete(); return *device; } @@ -578,7 +575,7 @@ std::string running_machine::get_statename(const char *option) // find length of the device name int end1 = statename_str.find("/", pos + 3); int end2 = statename_str.find("%", pos + 3); - int end = -1; + int end; if ((end1 != -1) && (end2 != -1)) end = MIN(end1, end2); diff --git a/src/emu/machine.h b/src/emu/machine.h index d06193a1596..dcd935cfde9 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -73,7 +73,6 @@ const int DEBUG_FLAG_OSD_ENABLED = 0x00001000; // The OSD debugger is e #define auto_alloc_array_clear(m, t, c) pool_alloc_array_clear(static_cast<running_machine &>(m).respool(), t, c) #define auto_free(m, v) pool_free(static_cast<running_machine &>(m).respool(), v) -#define auto_bitmap_alloc(m, w, h, f) auto_alloc(m, bitmap_t(w, h, f)) #define auto_bitmap_ind8_alloc(m, w, h) auto_alloc(m, bitmap_ind8(w, h)) #define auto_bitmap_ind16_alloc(m, w, h) auto_alloc(m, bitmap_ind16(w, h)) #define auto_bitmap_ind32_alloc(m, w, h) auto_alloc(m, bitmap_ind32(w, h)) @@ -191,7 +190,7 @@ public: bool scheduled_event_pending() const { return m_exit_pending || m_hard_reset_pending; } // fetch items by name - inline device_t *device(const char *tag) { return root_device().subdevice(tag); } + inline device_t *device(const char *tag) const { return root_device().subdevice(tag); } template<class _DeviceClass> inline _DeviceClass *device(const char *tag) { return downcast<_DeviceClass *>(device(tag)); } // configuration helpers diff --git a/src/emu/machine/generic.cpp b/src/emu/machine/generic.cpp index 79a3ea3f5cf..636b65f3581 100644 --- a/src/emu/machine/generic.cpp +++ b/src/emu/machine/generic.cpp @@ -9,7 +9,6 @@ *********************************************************************/ #include "emu.h" -#include "emuopts.h" #include "config.h" diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp index 220ced70a7a..8ec83710330 100644 --- a/src/emu/mame.cpp +++ b/src/emu/mame.cpp @@ -73,15 +73,7 @@ #include "emu.h" #include "emuopts.h" #include "osdepend.h" -#include "config.h" -#include "debugger.h" -#include "render.h" -#include "cheat.h" -#include "ui/ui.h" -#include "uiinput.h" -#include "crsshair.h" #include "validity.h" -#include "debug/debugcon.h" #include "luaengine.h" #include <time.h> diff --git a/src/emu/memory.cpp b/src/emu/memory.cpp index 653b858569f..f9e5e27cb1b 100644 --- a/src/emu/memory.cpp +++ b/src/emu/memory.cpp @@ -335,7 +335,8 @@ public: // construction/destruction handler_entry_read(UINT8 width, endianness_t endianness, UINT8 **rambaseptr) - : handler_entry(width, endianness, rambaseptr) + : handler_entry(width, endianness, rambaseptr), + m_ioport(NULL) { } @@ -397,7 +398,8 @@ public: // construction/destruction handler_entry_write(UINT8 width, endianness_t endianness, UINT8 **rambaseptr) - : handler_entry(width, endianness, rambaseptr) + : handler_entry(width, endianness, rambaseptr), + m_ioport(NULL) { } @@ -4079,7 +4081,8 @@ handler_entry::handler_entry(UINT8 width, endianness_t endianness, UINT8 **ramba m_byteend(0), m_bytemask(~0), m_rambaseptr(rambaseptr), - m_subunits(0) + m_subunits(0), + m_invsubmask(0) { } diff --git a/src/emu/network.cpp b/src/emu/network.cpp index 9619a435b2d..ceb557cdefd 100644 --- a/src/emu/network.cpp +++ b/src/emu/network.cpp @@ -9,7 +9,6 @@ #include <ctype.h> #include "emu.h" -#include "emuopts.h" #include "network.h" #include "config.h" #include "xmlfile.h" diff --git a/src/emu/render.cpp b/src/emu/render.cpp index f9e55bf9abe..230b5978e4e 100644 --- a/src/emu/render.cpp +++ b/src/emu/render.cpp @@ -2500,8 +2500,8 @@ render_target *render_manager::target_by_index(int index) const float render_manager::ui_aspect(render_container *rc) { - int orient = 0; - float aspect = 1.0f; + int orient; + float aspect; if (rc == m_ui_container || rc == NULL) { // ui container, aggregated multi-screen target diff --git a/src/emu/render.h b/src/emu/render.h index df305b5e23d..f3b37fb9aed 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -304,6 +304,14 @@ class render_primitive friend class simple_list<render_primitive>; public: + render_primitive(): + type(), + flags(0), + width(0), + container(NULL), + m_next(NULL) + {} + // render primitive types enum primitive_type { @@ -522,6 +530,8 @@ private: friend class simple_list<item>; public: + item() : m_next(NULL), m_type(0), m_flags(0), m_internal(0), m_width(0), m_texture(NULL) { } + // getters item *next() const { return m_next; } UINT8 type() const { return m_type; } diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp index 5248bc326b5..9ef62db2712 100644 --- a/src/emu/rendfont.cpp +++ b/src/emu/rendfont.cpp @@ -10,7 +10,6 @@ #include "emu.h" #include "rendfont.h" -#include "rendutil.h" #include "emuopts.h" #include "coreutil.h" diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp index 6733ecbcb92..847dc8ec1d6 100644 --- a/src/emu/rendlay.cpp +++ b/src/emu/rendlay.cpp @@ -53,8 +53,6 @@ #include "rendlay.h" #include "rendutil.h" #include "xmlfile.h" -#include "png.h" -#include "ui/ui.h" @@ -632,7 +630,7 @@ layout_element::component::component(running_machine &machine, xml_data_node &co std::string symbollist = xml_get_attribute_string_with_subst(machine, compnode, "symbollist", "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"); // split out position names from string and figure out our number of symbols - int location = -1; + int location; m_numstops = 0; location=symbollist.find(","); while (location!=-1) diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp index 370815e8366..a43adc4f58b 100644 --- a/src/emu/romload.cpp +++ b/src/emu/romload.cpp @@ -10,9 +10,7 @@ #include "emu.h" #include "emuopts.h" #include "drivenum.h" -#include "png.h" #include "chd.h" -#include "config.h" #include "softlist.h" #include "ui/ui.h" diff --git a/src/emu/save.cpp b/src/emu/save.cpp index fe20fe2a988..4af850163c2 100644 --- a/src/emu/save.cpp +++ b/src/emu/save.cpp @@ -194,7 +194,7 @@ void save_manager::save_memory(device_t *device, const char *module, const char save_error save_manager::check_file(running_machine &machine, emu_file &file, const char *gamename, void (CLIB_DECL *errormsg)(const char *fmt, ...)) { // if we want to validate the signature, compute it - UINT32 sig = 0; + UINT32 sig; sig = machine.save().signature(); // seek to the beginning and read the header diff --git a/src/emu/schedule.cpp b/src/emu/schedule.cpp index 565d027cfc4..43a26ebb1fd 100644 --- a/src/emu/schedule.cpp +++ b/src/emu/schedule.cpp @@ -490,9 +490,9 @@ void device_scheduler::timeslice() exec->m_totalcycles += ran; // update the local time for this CPU - attotime delta(0, exec->m_attoseconds_per_cycle * ran); - assert(delta >= attotime::zero); - exec->m_localtime += delta; + attotime deltatime(0, exec->m_attoseconds_per_cycle * ran); + assert(deltatime >= attotime::zero); + exec->m_localtime += deltatime; LOG((" %d ran, %d total, time = %s\n", ran, (INT32)exec->m_totalcycles, exec->m_localtime.as_string(PRECISION))); // if the new local CPU time is less than our target, move the target up, but not before the base diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp index 399c376c856..fb6fcbc1b57 100644 --- a/src/emu/screen.cpp +++ b/src/emu/screen.cpp @@ -58,7 +58,8 @@ screen_device::screen_device(const machine_config &mconfig, const char *tag, dev m_container(NULL), m_width(100), m_height(100), - m_visarea(0, 99, 0, 99), + m_visarea(0, 99, 0, 99), + m_texformat(), m_curbitmap(0), m_curtexture(0), m_changed(true), @@ -634,7 +635,7 @@ bool screen_device::update_partial(int scanline) LOG_PARTIAL_UPDATES(("updating %d-%d\n", clip.min_y, clip.max_y)); g_profiler.start(PROFILER_VIDEO); - UINT32 flags = UPDATE_HAS_NOT_CHANGED; + UINT32 flags; screen_bitmap &curbitmap = m_bitmap[m_curbitmap]; switch (curbitmap.format()) { @@ -751,7 +752,7 @@ void screen_device::update_now() LOG_PARTIAL_UPDATES(("doing scanline partial draw: Y %d X %d-%d\n", clip.max_y, clip.min_x, clip.max_x)); - UINT32 flags = UPDATE_HAS_NOT_CHANGED; + UINT32 flags; screen_bitmap &curbitmap = m_bitmap[m_curbitmap]; switch (curbitmap.format()) { diff --git a/src/emu/softlist.cpp b/src/emu/softlist.cpp index c90bb6cccdc..a8cdbb0f19f 100644 --- a/src/emu/softlist.cpp +++ b/src/emu/softlist.cpp @@ -9,7 +9,6 @@ ***************************************************************************/ #include "emu.h" -#include "pool.h" #include "emuopts.h" #include "softlist.h" #include "clifront.h" @@ -279,7 +278,8 @@ software_list_device::software_list_device(const machine_config &mconfig, const m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM), m_filter(NULL), m_parsed(false), - m_file(mconfig.options().hash_path(), OPEN_FLAG_READ) + m_file(mconfig.options().hash_path(), OPEN_FLAG_READ), + m_description(NULL) { } diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 3a08bdf4971..980e552f0b0 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -791,8 +791,9 @@ sound_stream::stream_input::stream_input() //------------------------------------------------- sound_stream::stream_output::stream_output() - : m_dependents(0), - m_gain(0x100) + : m_stream(NULL), + m_dependents(0), + m_gain(0x100) { } diff --git a/src/emu/speaker.cpp b/src/emu/speaker.cpp index c12b36b87d7..c525ff2cbc6 100644 --- a/src/emu/speaker.cpp +++ b/src/emu/speaker.cpp @@ -9,10 +9,6 @@ ***************************************************************************/ #include "emu.h" -#include "emuopts.h" -#include "osdepend.h" -#include "config.h" -#include "sound/wavwrite.h" diff --git a/src/emu/sprite.h b/src/emu/sprite.h index b2bd9cb7f0c..44a57606864 100644 --- a/src/emu/sprite.h +++ b/src/emu/sprite.h @@ -20,10 +20,11 @@ // class representing a single dirty region class sparse_dirty_rect : public rectangle -{ +{ friend class simple_list<sparse_dirty_rect>; public: + sparse_dirty_rect(): m_next(NULL) { } // getters const sparse_dirty_rect *next() const { return m_next; } diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp index 6f61210355b..999143f4c32 100644 --- a/src/emu/tilemap.cpp +++ b/src/emu/tilemap.cpp @@ -1589,7 +1589,8 @@ const device_type TILEMAP = &device_creator<tilemap_device>; tilemap_device::tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, TILEMAP, "Tilemap", tag, owner, clock, "tilemap", __FILE__), m_gfxdecode(*this), - m_standard_mapper(TILEMAP_STANDARD_COUNT), + m_standard_mapper(TILEMAP_STANDARD_COUNT), + m_bytes_per_entry(0), m_tile_width(8), m_tile_height(8), m_num_columns(64), diff --git a/src/emu/timer.cpp b/src/emu/timer.cpp index f92d0ecce9b..7d089ca4655 100644 --- a/src/emu/timer.cpp +++ b/src/emu/timer.cpp @@ -217,7 +217,7 @@ void timer_device::device_reset() case TIMER_TYPE_PERIODIC: { // convert the period into attotime - attotime period = attotime::never; + attotime period; if (m_period > attotime::zero) { period = m_period; diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp index f505c61eff7..f2bff8e7feb 100644 --- a/src/emu/ui/cheatopt.cpp +++ b/src/emu/ui/cheatopt.cpp @@ -11,7 +11,6 @@ #include "emu.h" #include "cheat.h" -#include "uiinput.h" #include "ui/ui.h" #include "ui/menu.h" #include "ui/cheatopt.h" diff --git a/src/emu/ui/filemngr.cpp b/src/emu/ui/filemngr.cpp index 00ff8354027..6bc789299d9 100644 --- a/src/emu/ui/filemngr.cpp +++ b/src/emu/ui/filemngr.cpp @@ -14,7 +14,6 @@ #include "emu.h" #include "ui/ui.h" #include "ui/menu.h" -#include "ui/swlist.h" #include "ui/filemngr.h" #include "ui/filesel.h" #include "ui/miscmenu.h" @@ -29,7 +28,7 @@ // ctor //------------------------------------------------- -ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container) +ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container), selected_device(NULL) { // This warning string is used when accessing from the force_file_manager call, i.e. // when the file manager is loaded top front in the case of mandatory image devices @@ -127,8 +126,8 @@ void ui_menu_file_manager::populate() if (subiter.count() > 0) { // if so, cycle through all its image interfaces - image_interface_iterator subiter(*dev); - for (device_image_interface *scan = subiter.first(); scan != NULL; scan = subiter.next()) + image_interface_iterator subiterator(*dev); + for (device_image_interface *scan = subiterator.first(); scan != NULL; scan = subiterator.next()) { // if it is a children device, and not something further down the device tree, we want it in the menu! if (strcmp(scan->device().owner()->tag(), dev->tag()) == 0) diff --git a/src/emu/ui/filesel.cpp b/src/emu/ui/filesel.cpp index 265e67d6f19..184b459da83 100644 --- a/src/emu/ui/filesel.cpp +++ b/src/emu/ui/filesel.cpp @@ -16,9 +16,7 @@ #include "ui/ui.h" #include "ui/menu.h" #include "zippath.h" -#include "ui/menu.h" #include "ui/filesel.h" -#include "ui/swlist.h" #include "imagedev/floppy.h" @@ -100,9 +98,7 @@ static void extra_text_draw_box(render_container *container, float origx1, float // take off the borders x1 += UI_BOX_LR_BORDER; - x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; - y2 -= UI_BOX_TB_BORDER; // draw the text within it container->manager().machine().ui().draw_text_full(container,text, x1, y1, text_width, JUSTIFY_LEFT, WRAP_WORD, @@ -222,7 +218,8 @@ static int is_valid_filename_char(unicode_char unichar) ui_menu_file_create::ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, std::string ¤t_directory, std::string ¤t_file, bool *ok) : ui_menu(machine, container), m_current_directory(current_directory), - m_current_file(current_file) + m_current_file(current_file), + m_current_format(NULL) { m_image = image; m_ok = ok; @@ -347,7 +344,8 @@ void ui_menu_file_create::handle() ui_menu_file_selector::ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, std::string ¤t_directory, std::string ¤t_file, bool has_empty, bool has_softlist, bool has_create, int *result) : ui_menu(machine, container), m_current_directory(current_directory), - m_current_file(current_file) + m_current_file(current_file), + m_entrylist(NULL) { m_image = image; m_has_empty = has_empty; @@ -538,7 +536,7 @@ void ui_menu_file_selector::append_entry_menu_item(const file_selector_entry *en void ui_menu_file_selector::populate() { zippath_directory *directory = NULL; - file_error err = FILERR_NONE; + file_error err; const osd_directory_entry *dirent; const file_selector_entry *entry; const file_selector_entry *selected_entry = NULL; diff --git a/src/emu/ui/imgcntrl.cpp b/src/emu/ui/imgcntrl.cpp index 6687055003b..eefea73189c 100644 --- a/src/emu/ui/imgcntrl.cpp +++ b/src/emu/ui/imgcntrl.cpp @@ -28,7 +28,10 @@ //------------------------------------------------- ui_menu_control_device_image::ui_menu_control_device_image(running_machine &machine, render_container *container, device_image_interface *_image) - : ui_menu(machine, container) + : ui_menu(machine, container), + submenu_result(0), + create_ok(false), + create_confirmed(false) { image = _image; diff --git a/src/emu/ui/inputmap.cpp b/src/emu/ui/inputmap.cpp index b660cac2447..0cf08392b42 100644 --- a/src/emu/ui/inputmap.cpp +++ b/src/emu/ui/inputmap.cpp @@ -224,7 +224,7 @@ ui_menu_input_specific::~ui_menu_input_specific() /*------------------------------------------------- menu_input - display a menu for inputs -------------------------------------------------*/ -ui_menu_input::ui_menu_input(running_machine &machine, render_container *container) : ui_menu(machine, container) +ui_menu_input::ui_menu_input(running_machine &machine, render_container *container) : ui_menu(machine, container), last_sortorder(0), record_next(false) { pollingitem = 0; pollingref = 0; @@ -264,7 +264,6 @@ void ui_menu_input::handle() if (pollingitem != NULL) { input_item_data *item = pollingitem; - input_seq newseq; /* if UI_CANCEL is pressed, abort */ if (ui_input_pressed(machine(), IPT_UI_CANCEL)) @@ -533,7 +532,7 @@ void ui_menu_settings::handle() switches menus -------------------------------------------------*/ -ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container) +ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container), diplist(NULL), dipcount(0) { type = _type; } diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp index 0bc3f549c0f..b49aa51d4e3 100644 --- a/src/emu/ui/mainmenu.cpp +++ b/src/emu/ui/mainmenu.cpp @@ -9,17 +9,12 @@ *********************************************************************/ #include "emu.h" -#include "audit.h" #include "crsshair.h" -#include "osdnet.h" #include "emuopts.h" #include "rendutil.h" #include "cheat.h" -#include "uiinput.h" -#include "ui/ui.h" #include "ui/menu.h" #include "ui/filemngr.h" -#include "ui/filesel.h" #include "ui/barcode.h" #include "ui/cheatopt.h" #include "ui/info.h" @@ -33,7 +28,6 @@ #include "ui/tapectrl.h" #include "ui/videoopt.h" #include "imagedev/cassette.h" -#include "imagedev/bitbngr.h" #include "machine/bcreader.h" diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp index 49ab6b897bf..63b47a37b5f 100644 --- a/src/emu/ui/menu.cpp +++ b/src/emu/ui/menu.cpp @@ -9,14 +9,12 @@ *********************************************************************/ #include "emu.h" -#include "emuopts.h" #include "rendutil.h" #include "cheat.h" #include "uiinput.h" #include "ui/ui.h" #include "ui/menu.h" #include "ui/mainmenu.h" -#include "ui/cheatopt.h" @@ -411,7 +409,7 @@ void ui_menu::draw(bool customonly) float effective_width, effective_left; float visible_width, visible_main_menu_height; - float visible_extra_menu_height = 0; + float visible_extra_menu_height; float visible_top, visible_left; int selected_subitem_too_big = FALSE; int visible_lines; @@ -812,8 +810,8 @@ void ui_menu::handle_events() void ui_menu::handle_keys(UINT32 flags) { int ignorepause = ui_menu::stack_has_special_main_menu(); - int ignoreright = FALSE; - int ignoreleft = FALSE; + int ignoreright; + int ignoreleft; int code; // bail if no items diff --git a/src/emu/ui/menu.h b/src/emu/ui/menu.h index b62bd51d8cb..c16add8d5c8 100644 --- a/src/emu/ui/menu.h +++ b/src/emu/ui/menu.h @@ -180,7 +180,6 @@ private: void draw_text_box(); void handle_events(); void handle_keys(UINT32 flags); - void clear_free_list(); inline bool exclusive_input_pressed(int key, int repeat); static void clear_free_list(running_machine &machine); diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp index b6b7066dbd0..1f5d3e49c3d 100644 --- a/src/emu/ui/miscmenu.cpp +++ b/src/emu/ui/miscmenu.cpp @@ -15,7 +15,6 @@ #include "ui/ui.h" #include "ui/menu.h" #include "ui/miscmenu.h" -#include "ui/filemngr.h" /*************************************************************************** diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp index 54fcc4b8fbf..914fae5f900 100644 --- a/src/emu/ui/selgame.cpp +++ b/src/emu/ui/selgame.cpp @@ -9,18 +9,14 @@ ***************************************************************************/ #include "emu.h" -#include "osdnet.h" #include "emuopts.h" #include "ui/ui.h" #include "ui/menu.h" -#include "rendutil.h" -#include "cheat.h" #include "uiinput.h" #include "ui/selgame.h" #include "ui/inputmap.h" #include "ui/miscmenu.h" #include "audit.h" -#include "crsshair.h" #include <ctype.h> @@ -409,7 +405,6 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott x1 += UI_BOX_LR_BORDER; x2 -= UI_BOX_LR_BORDER; y1 += UI_BOX_TB_BORDER; - y2 -= UI_BOX_TB_BORDER; // draw all lines for (line = 0; line < 4; line++) diff --git a/src/emu/ui/swlist.cpp b/src/emu/ui/swlist.cpp index d60e24f44a1..b8dbeb45ccf 100644 --- a/src/emu/ui/swlist.cpp +++ b/src/emu/ui/swlist.cpp @@ -270,8 +270,8 @@ void ui_menu_software_list::handle() // handle selections else if (event->iptkey == IPT_UI_SELECT) { - entry_info *entry = (entry_info *) event->itemref; - m_result = entry->short_name; + entry_info *info = (entry_info *) event->itemref; + m_result = info->short_name; ui_menu::stack_pop(machine()); } else if (event->iptkey == IPT_SPECIAL) diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index 19e84e55045..e92775be02d 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -18,9 +18,7 @@ #include "uiinput.h" #include "ui/ui.h" #include "ui/menu.h" -#include "ui/cheatopt.h" #include "ui/mainmenu.h" -#include "ui/miscmenu.h" #include "ui/filemngr.h" #include "ui/sliders.h" #include "ui/viewgfx.h" @@ -1688,7 +1686,6 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co UINT32 ui_manager::handler_load_save(running_machine &machine, render_container *container, UINT32 state) { char filename[20]; - input_code code; char file = 0; // if we're not in the middle of anything, skip diff --git a/src/emu/ui/videoopt.cpp b/src/emu/ui/videoopt.cpp index 518d2232a0c..584ec6e679f 100644 --- a/src/emu/ui/videoopt.cpp +++ b/src/emu/ui/videoopt.cpp @@ -11,8 +11,6 @@ #include "emu.h" #include "rendutil.h" -#include "uiinput.h" -#include "ui/ui.h" #include "ui/menu.h" #include "ui/videoopt.h" diff --git a/src/emu/ui/viewgfx.cpp b/src/emu/ui/viewgfx.cpp index 434cc9255f3..d4aa5ab3a27 100644 --- a/src/emu/ui/viewgfx.cpp +++ b/src/emu/ui/viewgfx.cpp @@ -10,7 +10,6 @@ #include "emu.h" #include "ui/ui.h" -#include "ui/menu.h" #include "uiinput.h" #include "render.h" #include "rendfont.h" diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp index 5f407725366..107d94e9731 100644 --- a/src/emu/uiinput.cpp +++ b/src/emu/uiinput.cpp @@ -249,7 +249,7 @@ bool ui_input_pressed(running_machine &machine, int code) bool ui_input_pressed_repeat(running_machine &machine, int code, int speed) { ui_input_private *uidata = machine.ui_input_data; - int pressed = FALSE; + int pressed; g_profiler.start(PROFILER_INPUT); diff --git a/src/emu/video.cpp b/src/emu/video.cpp index a9e07972f6d..7d600e82847 100644 --- a/src/emu/video.cpp +++ b/src/emu/video.cpp @@ -1142,7 +1142,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension) // find length of the device name int end1 = snapstr.find("/", pos + 3); int end2 = snapstr.find("%", pos + 3); - int end = -1; + int end; if ((end1 != -1) && (end2 != -1)) end = MIN(end1, end2); diff --git a/src/emu/video/resnet.cpp b/src/emu/video/resnet.cpp index 57f9423f480..a4df1c0bdc4 100644 --- a/src/emu/video/resnet.cpp +++ b/src/emu/video/resnet.cpp @@ -346,7 +346,7 @@ double compute_resistor_net_outputs( max = minval; for( i = 0; i < networks_no; i++ ) { - double val = 0.0; + double val; double max_tmp = minval; double min_tmp = maxval; diff --git a/src/emu/video/rgbgen.h b/src/emu/video/rgbgen.h index dae5a2984d3..4ade036637a 100644 --- a/src/emu/video/rgbgen.h +++ b/src/emu/video/rgbgen.h @@ -19,7 +19,7 @@ class rgbaint_t { public: - inline rgbaint_t() { } + inline rgbaint_t(): m_a(0), m_r(0), m_g(0), m_b(0) { } inline rgbaint_t(UINT32 rgba) { set(rgba); } inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); } inline rgbaint_t(rgb_t& rgba) { set(rgba); } diff --git a/src/emu/video/rgbvmx.h b/src/emu/video/rgbvmx.h index 66d0ae8d2c4..f5829c17c56 100644 --- a/src/emu/video/rgbvmx.h +++ b/src/emu/video/rgbvmx.h @@ -28,11 +28,11 @@ protected: typedef __vector unsigned int VECU32; public: - inline rgbaint_t() { } + inline rgbaint_t(): VECS8(0), VECU8(0), VECS16(0), VECU16(0), VECS32(0), VECU32(0) { } inline rgbaint_t(UINT32 rgba) { set(rgba); } inline rgbaint_t(INT32 a, INT32 r, INT32 g, INT32 b) { set(a, r, g, b); } inline rgbaint_t(rgb_t& rgb) { set(rgb); } - inline rgbaint_t(VECS32 rgba) { m_value = rgba; } + inline rgbaint_t(VECS32 rgba): VECS8(0), VECU8(0), VECS16(0), VECU16(0), VECS32(0), VECU32(0) { m_value = rgba; } inline void set(rgbaint_t& other) { m_value = other.m_value; } diff --git a/src/emu/video/vector.cpp b/src/emu/video/vector.cpp index 720e24bd049..db7b4be77d3 100644 --- a/src/emu/video/vector.cpp +++ b/src/emu/video/vector.cpp @@ -130,13 +130,15 @@ const device_type VECTOR = &device_creator<vector_device>; vector_device::vector_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_video_interface(mconfig, *this) + device_video_interface(mconfig, *this), + m_vector_list(NULL) { } vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, VECTOR, "VECTOR", tag, owner, clock, "vector_device", __FILE__), - device_video_interface(mconfig, *this) + device_video_interface(mconfig, *this), + m_vector_list(NULL) { } |