diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp index 04ddbf627de..9847cb81662 100644 --- a/src/devices/imagedev/floppy.cpp +++ b/src/devices/imagedev/floppy.cpp @@ -685,7 +685,7 @@ int floppy_image_device::find_index(UINT32 position, const std::vector & { int spos = (buf.size() >> 1)-1; int step; - for(step=1; step>= 1; for(;;) { diff --git a/src/devices/imagedev/snapquik.cpp b/src/devices/imagedev/snapquik.cpp index 02fc2fa241e..78d55333f16 100644 --- a/src/devices/imagedev/snapquik.cpp +++ b/src/devices/imagedev/snapquik.cpp @@ -20,17 +20,23 @@ const device_type SNAPSHOT = &device_creator; snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SNAPSHOT, "Snapshot", tag, owner, clock, "snapshot_image", __FILE__), - device_image_interface(mconfig, *this), - m_interface(NULL), - m_delay_attoseconds(0) + device_image_interface(mconfig, *this), + m_file_extensions(NULL), + m_interface(NULL), + m_delay_seconds(0), + m_delay_attoseconds(0), + m_timer(NULL) { } snapshot_image_device::snapshot_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), - m_interface(NULL), - m_delay_attoseconds(0) + device_t(mconfig, type, name, tag, owner, clock, shortname, source), + device_image_interface(mconfig, *this), + m_file_extensions(NULL), + m_interface(NULL), + m_delay_seconds(0), + m_delay_attoseconds(0), + m_timer(NULL) { } //------------------------------------------------- diff --git a/src/emu/config.cpp b/src/emu/config.cpp index 711b0a404f9..7eb77de9cfd 100644 --- a/src/emu/config.cpp +++ b/src/emu/config.cpp @@ -86,7 +86,7 @@ void config_register(running_machine &machine, const char *nodename, config_save newtype->save = save; /* add us to the end */ - for (ptype = &typelist; *ptype; ptype = &(*ptype)->next) ; + for (ptype = &typelist; *ptype; ptype = &(*ptype)->next) { } *ptype = newtype; } diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index 4fd2a576750..9c6c76aba10 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -441,7 +441,7 @@ void debug_view_manager::flush_osd_updates() debug_view *debug_view_manager::append(debug_view *view) { debug_view **viewptr; - for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) ; + for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) { } *viewptr = view; return view; } diff --git a/src/emu/device.cpp b/src/emu/device.cpp index d984a1d2e2a..c6c29d7af4a 100644 --- a/src/emu/device.cpp +++ b/src/emu/device.cpp @@ -853,7 +853,7 @@ device_interface::device_interface(device_t &device, const char *type) m_type(type) { device_interface **tailptr; - for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) ; + for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) { } *tailptr = this; } diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index 1e578068b77..7db30e57869 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -290,7 +290,7 @@ void emu_options::update_slot_options() } } } - while (add_slot_options(false)); + while (add_slot_options(false)) { } add_device_options(false); } @@ -359,13 +359,15 @@ void emu_options::remove_device_options() bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_string, const char *name, const char *value) { // an initial parse to capture the initial set of values - bool result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); + bool result; + + core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); // keep adding slot options until we stop seeing new stuff bool isfirstpass = true; while (add_slot_options(isfirstpass)) { - result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); + core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); isfirstpass = false; } @@ -373,9 +375,9 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_ add_device_options(true); if (name != NULL && exists(name)) set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string); - result = core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); + core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string); - int num = 0; + int num; do { num = options_count(); update_slot_options(); @@ -528,7 +530,7 @@ void emu_options::set_system_name(const char *name) // then add the options add_device_options(true); - int num = 0; + int num; do { num = options_count(); update_slot_options(); diff --git a/src/emu/hash.cpp b/src/emu/hash.cpp index 1d92458d139..3ada8eb2690 100644 --- a/src/emu/hash.cpp +++ b/src/emu/hash.cpp @@ -292,8 +292,6 @@ bool hash_collection::from_internal_string(const char *string) // non-hex alpha values specify a hash type if (uc >= 'G' && uc <= 'Z') { - if (skip_digits != 0) - errors = true; skip_digits = 0; if (uc == HASH_CRC) { diff --git a/src/emu/hashfile.cpp b/src/emu/hashfile.cpp index 692e126413f..c4735191780 100644 --- a/src/emu/hashfile.cpp +++ b/src/emu/hashfile.cpp @@ -539,7 +539,7 @@ const char *extra_info = NULL; bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result) { - hash_file *hashfile = NULL; + hash_file *hashfile; const hash_info *info; /* open the hash file */ diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp index 9ef62db2712..dea9f32db4a 100644 --- a/src/emu/rendfont.cpp +++ b/src/emu/rendfont.cpp @@ -510,7 +510,7 @@ bool render_font::load_bdf() else if (strncmp(ptr, "BITMAP", 6) == 0) { // stash the raw pointer and scan for the end of the character - for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) ; + for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) { } break; } } diff --git a/src/emu/ui/filesel.cpp b/src/emu/ui/filesel.cpp index 184b459da83..78193f49399 100644 --- a/src/emu/ui/filesel.cpp +++ b/src/emu/ui/filesel.cpp @@ -271,7 +271,7 @@ void ui_menu_file_create::populate() item_append("New Image Name:", new_image_name, 0, ITEMREF_NEW_IMAGE_NAME); // do we support multiple formats? - format = m_image->formatlist(); + if (ENABLE_FORMATS) format = m_image->formatlist(); if (ENABLE_FORMATS && (format != NULL)) { item_append("Image Format:", m_current_format->description(), 0, ITEMREF_FORMAT); diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp index e92775be02d..046aa8bfa18 100644 --- a/src/emu/ui/ui.cpp +++ b/src/emu/ui/ui.cpp @@ -369,7 +369,7 @@ void ui_manager::display_startup_screens(bool first_time, bool show_disclaimer) // clear the input memory machine().input().reset_polling(); - while (machine().input().poll_switches() != INPUT_CODE_INVALID) ; + while (machine().input().poll_switches() != INPUT_CODE_INVALID) { } // loop while we have a handler while (m_handler_callback != handler_ingame && !machine().scheduled_event_pending() && !ui_menu::stack_has_special_main_menu()) diff --git a/src/emu/ui/viewgfx.cpp b/src/emu/ui/viewgfx.cpp index d4aa5ab3a27..0d133af3f6c 100644 --- a/src/emu/ui/viewgfx.cpp +++ b/src/emu/ui/viewgfx.cpp @@ -192,7 +192,7 @@ static void ui_gfx_count_devices(running_machine &machine, ui_gfx_state &state) i < tempcount && state.gfxset.devcount < MAX_GFX_DECODERS; i++, interface = gfx_iter.next()) { - for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++); + for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++) { } // count = index of first NULL if (count > 0) @@ -1006,8 +1006,8 @@ static void tilemap_handler(running_machine &machine, render_container *containe pixelscale = state.tilemap.zoom; if (pixelscale == 0) { - for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) ; - for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) ; + for (maxxscale = 1; mapwidth * (maxxscale + 1) < mapboxwidth; maxxscale++) { } + for (maxyscale = 1; mapheight * (maxyscale + 1) < mapboxheight; maxyscale++) { } pixelscale = MIN(maxxscale, maxyscale); } diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index 7447445a519..01d56378939 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -719,11 +719,11 @@ void validity_checker::validate_analog_input_field(ioport_field &field) if (field.type() == IPT_POSITIONAL || field.type() == IPT_POSITIONAL_V) { int shift; - for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) ; + for (shift = 0; shift <= 31 && (~field.mask() & (1 << shift)) != 0; shift++) { } // convert the positional max value to be in the bitmask for testing - INT32 analog_max = field.maxval(); - analog_max = (analog_max - 1) << shift; + //INT32 analog_max = field.maxval(); + //analog_max = (analog_max - 1) << shift; // positional port size must fit in bits used if ((field.mask() >> shift) + 1 < field.maxval())