summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2012-02-29 09:13:22 +0000
committer Miodrag Milanovic <mmicko@gmail.com>2012-02-29 09:13:22 +0000
commitbef76826c9ec14aa4f08da532bc01f6411efa011 (patch)
tree8106f9e2432368bd90d7d7969e75b578c6f13e89 /src
parentc33fba77f0d07abf1c48cd9393596dd63fe22815 (diff)
fixed several Visual Studio compiler warnings and 64-bit libflac compilation by Firewave, and idectrl change from Carl (no whatsnew)
Diffstat (limited to 'src')
-rw-r--r--src/emu/machine/amigafdc.c2
-rw-r--r--src/emu/machine/idectrl.c2
-rw-r--r--src/emu/machine/nscsi_bus.c3
-rw-r--r--src/emu/uimain.c2
-rw-r--r--src/lib/formats/ap_dsk35.c2
-rw-r--r--src/lib/lib7z/CpuArch.h1
-rw-r--r--src/lib/libflac/libflac/bitreader.c4
-rw-r--r--src/lib/util/chdcd.c4
-rw-r--r--src/mame/drivers/segas24.c4
-rw-r--r--src/mame/machine/maple-dc.c2
-rw-r--r--src/mame/video/rdpblend.h6
-rw-r--r--src/mame/video/rdptpipe.h6
-rw-r--r--src/osd/sdl/dview.c3
-rw-r--r--src/tools/src2html.c11
14 files changed, 29 insertions, 23 deletions
diff --git a/src/emu/machine/amigafdc.c b/src/emu/machine/amigafdc.c
index feeb0ef4f68..59e11ea1700 100644
--- a/src/emu/machine/amigafdc.c
+++ b/src/emu/machine/amigafdc.c
@@ -195,7 +195,7 @@ void amiga_fdc::live_run(attotime limit)
}
if(cur_live.bit_counter > 8)
- abort();
+ fatalerror("amiga_fdc::live_run - cur_live.bit_counter > 8");
if(cur_live.bit_counter == 8) {
live_delay(RUNNING_SYNCPOINT);
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c
index c52272c064f..aeafe0c7d95 100644
--- a/src/emu/machine/idectrl.c
+++ b/src/emu/machine/idectrl.c
@@ -2143,6 +2143,8 @@ void ide_hdd_image_device::device_reset()
ide_build_features();
}
}
+ else
+ m_disk = NULL;
}
diff --git a/src/emu/machine/nscsi_bus.c b/src/emu/machine/nscsi_bus.c
index 816d7e26010..187069649b6 100644
--- a/src/emu/machine/nscsi_bus.c
+++ b/src/emu/machine/nscsi_bus.c
@@ -396,7 +396,8 @@ UINT8 nscsi_full_device::scsi_get_data(int id, int pos)
case SBUF_SENSE:
return scsi_sense_buffer[pos];
default:
- abort();
+ fatalerror("nscsi_full_device::scsi_get_data - unknown id");
+ return 0; // shut up compiler
}
}
diff --git a/src/emu/uimain.c b/src/emu/uimain.c
index 7c3a0622abb..eaac7023d66 100644
--- a/src/emu/uimain.c
+++ b/src/emu/uimain.c
@@ -308,7 +308,7 @@ void ui_menu_main::handle()
break;
default:
- abort();
+ fatalerror("ui_menu_main::handle - unknown reference");
}
}
}
diff --git a/src/lib/formats/ap_dsk35.c b/src/lib/formats/ap_dsk35.c
index 4a3e78363fa..a78c494328b 100644
--- a/src/lib/formats/ap_dsk35.c
+++ b/src/lib/formats/ap_dsk35.c
@@ -1300,7 +1300,7 @@ bool dc42_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
UINT8 format = h[0x51];
if((encoding != 0x00 || format != 0x02) && (encoding != 0x01 || format != 0x22)) {
- logerror("dc42: Unsupported encoding/format combination %02x\%02x\n", encoding, format);
+ logerror("dc42: Unsupported encoding/format combination %02x/%02x\n", encoding, format);
return false;
}
diff --git a/src/lib/lib7z/CpuArch.h b/src/lib/lib7z/CpuArch.h
index b7e6c7ea71c..f424502f473 100644
--- a/src/lib/lib7z/CpuArch.h
+++ b/src/lib/lib7z/CpuArch.h
@@ -98,6 +98,7 @@ Stop_Compiling_Bad_Endian
#endif
#if defined(MY_CPU_LE_UNALIGN) && defined(_WIN64) && (_MSC_VER >= 1300)
+#include <stdlib.h>
#pragma intrinsic(_byteswap_ulong)
#pragma intrinsic(_byteswap_uint64)
diff --git a/src/lib/libflac/libflac/bitreader.c b/src/lib/libflac/libflac/bitreader.c
index 02e4d4ba4b0..6e15c18f3ce 100644
--- a/src/lib/libflac/libflac/bitreader.c
+++ b/src/lib/libflac/libflac/bitreader.c
@@ -149,7 +149,7 @@ static FLAC__uint32 local_swap32_(FLAC__uint32 x)
return (x>>16) | (x<<16);
}
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && defined(_M_IX86)
/* OPT: an MSVC built-in would be better */
static void local_swap32_block_(FLAC__uint32 *start, FLAC__uint32 len)
{
@@ -258,7 +258,7 @@ FLAC__bool bitreader_read_from_client_(FLAC__BitReader *br)
#if WORDS_BIGENDIAN
#else
end = (br->words*FLAC__BYTES_PER_WORD + br->bytes + bytes + (FLAC__BYTES_PER_WORD-1)) / FLAC__BYTES_PER_WORD;
-# if defined(_MSC_VER) && (FLAC__BYTES_PER_WORD == 4)
+# if defined(_MSC_VER) && (FLAC__BYTES_PER_WORD == 4) && defined(_M_IX86)
if(br->cpu_info.type == FLAC__CPUINFO_TYPE_IA32 && br->cpu_info.data.ia32.bswap) {
start = br->words;
local_swap32_block_(br->buffer + start, end - start);
diff --git a/src/lib/util/chdcd.c b/src/lib/util/chdcd.c
index aaad58fd7b0..49eed70fce6 100644
--- a/src/lib/util/chdcd.c
+++ b/src/lib/util/chdcd.c
@@ -301,7 +301,7 @@ UINT64 read_uint64(FILE *infile)
}
/*-------------------------------------------------
- chdcd_parse_toc - parse a CDRWin format CUE file
+ chdcd_parse_nero - parse a Nero format image file
-------------------------------------------------*/
chd_error chdcd_parse_nero(const char *tocfname, cdrom_toc &outtoc, chdcd_track_input_info &outinfo)
@@ -579,7 +579,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_
}
/*-------------------------------------------------
- chdcd_parse_toc - parse a CDRWin format CUE file
+ chdcd_parse_cue - parse a CDRWin format CUE file
-------------------------------------------------*/
chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_input_info &outinfo)
diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c
index f07465380fa..554170f8040 100644
--- a/src/mame/drivers/segas24.c
+++ b/src/mame/drivers/segas24.c
@@ -821,7 +821,7 @@ void segas24_state::irq_timer_sync()
break;
}
case 2: {
- abort();
+ fatalerror("egas24_state::irq_timer_sync - case 2");
}
case 3: {
int ppos = floor((irq_synctime - irq_vsynctime).as_double() * TIMER_CLOCK);
@@ -852,7 +852,7 @@ void segas24_state::irq_timer_start(int old_tmode)
break;
}
case 2:
- abort();
+ fatalerror("egas24_state::irq_timer_start - case 2");
break;
case 3: {
int count = 0x1000 - irq_tval;
diff --git a/src/mame/machine/maple-dc.c b/src/mame/machine/maple-dc.c
index 6f3e8355083..030af47e005 100644
--- a/src/mame/machine/maple-dc.c
+++ b/src/mame/machine/maple-dc.c
@@ -39,7 +39,7 @@ void maple_dc_device::register_port(int port, maple_device *device)
void maple_dc_device::device_start()
{
- fprintf(stderr, "Device started\n");
+ logerror("maple_dc_device started\n");
cpu = machine().device<sh4_device>(maincpu_tag);
timer = timer_alloc(0);
diff --git a/src/mame/video/rdpblend.h b/src/mame/video/rdpblend.h
index 77dc6cf476d..bd8d79799fb 100644
--- a/src/mame/video/rdpblend.h
+++ b/src/mame/video/rdpblend.h
@@ -3,10 +3,10 @@
#include "emu.h"
-class OtherModesT;
-class MiscStateT;
+struct OtherModesT;
+struct MiscStateT;
class n64_rdp;
-class rdp_span_aux;
+struct rdp_span_aux;
class Color;
struct rdp_poly_state;
diff --git a/src/mame/video/rdptpipe.h b/src/mame/video/rdptpipe.h
index 46ab6f131fe..6bab5b0084e 100644
--- a/src/mame/video/rdptpipe.h
+++ b/src/mame/video/rdptpipe.h
@@ -3,10 +3,10 @@
#include "emu.h"
-class OtherModesT;
-class MiscStateT;
+struct OtherModesT;
+struct MiscStateT;
class Color;
-class rdp_span_aux;
+struct rdp_span_aux;
struct rdp_poly_state;
class N64TexturePipeT
diff --git a/src/osd/sdl/dview.c b/src/osd/sdl/dview.c
index 38c7d061347..c801234fe88 100644
--- a/src/osd/sdl/dview.c
+++ b/src/osd/sdl/dview.c
@@ -356,8 +356,7 @@ static void dview_class_init(DViewClass *dvc)
dvc->fixedfont = pango_font_description_from_string("Monospace 10");
if(!dvc->fixedfont) {
- mame_printf_error("Couldn't find a monospace font, aborting\n");
- abort();
+ fatalerror("Couldn't find a monospace font, aborting");
}
GTK_CONTAINER_CLASS(dvc)->forall = dview_forall;
diff --git a/src/tools/src2html.c b/src/tools/src2html.c
index 7ac8b9bd5a2..c5ce5699fd8 100644
--- a/src/tools/src2html.c
+++ b/src/tools/src2html.c
@@ -585,6 +585,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
bool last_token_was_include = false;
bool last_was_token = false;
bool quotes_are_linked = false;
+ UINT8 curquote = 0;
int curcol = 0;
for (char *srcptr = srcline; *srcptr != 0; )
{
@@ -673,7 +674,8 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
dstline.catprintf("<span class=\"string\">%c", ch);
else
dstline.cat(ch);
- in_quotes = ch;
+ in_quotes = true;
+ curquote = ch;
// handle includes
if (last_token_was_include)
@@ -693,7 +695,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
}
// track closing quotes
- else if (!in_comment && !in_inline_comment && in_quotes && ch == in_quotes && !escape)
+ else if (!in_comment && !in_inline_comment && in_quotes && (ch == curquote) && !escape)
{
if (quotes_are_linked)
dstline.catprintf("</a>");
@@ -701,7 +703,8 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
dstline.catprintf("%c</span>", ch);
else
dstline.cat(ch);
- in_quotes = 0;
+ in_quotes = false;
+ curquote = 0;
quotes_are_linked = false;
}
@@ -719,7 +722,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, astring &
// Update escape state
if (in_quotes)
- escape = (ch == '\\' && type == FILE_TYPE_C) ? !escape : 0;
+ escape = (ch == '\\' && type == FILE_TYPE_C) ? !escape : false;
}
// finish inline comments