summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/emu/devcb.h4
-rw-r--r--src/lib/formats/adam_cas.c9
-rw-r--r--src/lib/formats/flopimg.c2
-rw-r--r--src/lib/formats/pasti_dsk.c2
-rw-r--r--src/mame/drivers/cubeqst.c4
-rw-r--r--src/mame/drivers/globalfr.c2
-rw-r--r--src/mame/drivers/igs017.c4
-rw-r--r--src/mame/video/galaxia.c2
-rw-r--r--src/mame/video/gticlub.c5
-rw-r--r--src/mame/video/rdptpipe.c2
10 files changed, 17 insertions, 19 deletions
diff --git a/src/emu/devcb.h b/src/emu/devcb.h
index 2df5b6e1b39..1dcb8e49a20 100644
--- a/src/emu/devcb.h
+++ b/src/emu/devcb.h
@@ -117,7 +117,7 @@ UINT8 devcb_stub(device_t *device, offs_t offset)
// static template for a read16 stub function that calls through a given READ16_MEMBER
template<class _Class, UINT16 (_Class::*_Function)(address_space &, offs_t, UINT16)>
-UINT16 devcb_stub16(device_t *device, offs_t offset, UINT16 mask=0xffff)
+UINT16 devcb_stub16(device_t *device, offs_t offset, UINT16 mask)
{
_Class *target = downcast<_Class *>(device);
return (target->*_Function)(*device->machine().memory().first_space(), offset, mask);
@@ -141,7 +141,7 @@ void devcb_stub(device_t *device, offs_t offset, UINT8 data)
// static template for a write16 stub function that calls through a given WRITE16_MEMBER
template<class _Class, void (_Class::*_Function)(address_space &, offs_t, UINT16, UINT16)>
-void devcb_stub16(device_t *device, offs_t offset, UINT16 data, UINT16 mask=0xffff)
+void devcb_stub16(device_t *device, offs_t offset, UINT16 data, UINT16 mask)
{
_Class *target = downcast<_Class *>(device);
(target->*_Function)(*device->machine().memory().first_space(), offset, data, mask);
diff --git a/src/lib/formats/adam_cas.c b/src/lib/formats/adam_cas.c
index 521d2c9c1e1..1e8e328b517 100644
--- a/src/lib/formats/adam_cas.c
+++ b/src/lib/formats/adam_cas.c
@@ -58,7 +58,7 @@ static casserr_t coladam_ddp_identify ( cassette_image *cass, struct CassetteOpt
// Store byte of data
casserr_t coladam_put_byte(cassette_image *cass, int channel, double *time_index, int byte, int *prev_sign)
{
- casserr_t err;
+ casserr_t err = CASSETTE_ERROR_SUCCESS;
for (int i = 0; i < 8; i++)
{
if(byte & 0x80)
@@ -127,7 +127,7 @@ static casserr_t coladam_ddp_load( cassette_image *cass )
double time = 0.;
int i, block, prev_sign=-1;
UINT8 buffer[0x400];
- casserr_t err;
+ casserr_t err = CASSETTE_ERROR_SUCCESS;
// It would appear that data packs that originally had the type GW data layout and headers work fine when converted to type
// HE. Thus we set all tapes to type HE.
@@ -194,10 +194,7 @@ static casserr_t coladam_ddp_load( cassette_image *cass )
}
}
- if (err)
- return err;
-
- return CASSETTE_ERROR_SUCCESS;
+ return err;
}
diff --git a/src/lib/formats/flopimg.c b/src/lib/formats/flopimg.c
index bb551aeb5dd..c416d2c4ca0 100644
--- a/src/lib/formats/flopimg.c
+++ b/src/lib/formats/flopimg.c
@@ -1162,7 +1162,7 @@ UINT32 floppy_image_format_t::bitn_r(const UINT32 *buffer, int offset, int count
{
UINT32 r = 0;
for(int i=0; i<count; i++)
- r = (r << 1) | bit_r(buffer, offset+i);
+ r = (r << 1) | (UINT32) bit_r(buffer, offset+i);
return r;
}
diff --git a/src/lib/formats/pasti_dsk.c b/src/lib/formats/pasti_dsk.c
index 2e08b5ac1d4..9e61f29546c 100644
--- a/src/lib/formats/pasti_dsk.c
+++ b/src/lib/formats/pasti_dsk.c
@@ -535,7 +535,7 @@ void pasti_format::map_sectors_in_track(wd_obs &obs, wd_sect_info *sect_infos)
int hpos = (i+3) % tsize;
int j;
bool synced = false;
- int bcount, tend;
+ int bcount=0, tend=0;
int best_bcount=0, best_j=0;
for(j=0; j != obs.sector_count; j++) {
match_mfm_data(obs, hpos, obs.sectors[j].id, 6, hbyte, bcount, tend, synced);
diff --git a/src/mame/drivers/cubeqst.c b/src/mame/drivers/cubeqst.c
index 6d8fbd14383..e00e654cfbc 100644
--- a/src/mame/drivers/cubeqst.c
+++ b/src/mame/drivers/cubeqst.c
@@ -535,8 +535,8 @@ static MACHINE_CONFIG_START( cubeqst, cubeqst_state )
MCFG_LASERDISC_SIMUTREK_ADD("laserdisc")
MCFG_LASERDISC_OVERLAY_STATIC(CUBEQST_HBLANK, CUBEQST_VCOUNT, cubeqst)
MCFG_LASERDISC_OVERLAY_CLIP(0, 320-1, 0, 256-8)
- MCFG_LASERDISC_OVERLAY_POSITION(0.002, -0.018)
- MCFG_LASERDISC_OVERLAY_SCALE(1.0, 1.030)
+ MCFG_LASERDISC_OVERLAY_POSITION(0.002f, -0.018f)
+ MCFG_LASERDISC_OVERLAY_SCALE(1.0f, 1.030f)
MCFG_LASERDISC_SCREEN_ADD_NTSC("screen", "laserdisc")
diff --git a/src/mame/drivers/globalfr.c b/src/mame/drivers/globalfr.c
index d0c7cf295e1..258e643ba2e 100644
--- a/src/mame/drivers/globalfr.c
+++ b/src/mame/drivers/globalfr.c
@@ -38,7 +38,7 @@ static WRITE16_HANDLER(vfd_w)
{
globalfr_state *state = space->machine().driver_data<globalfr_state>();
- int clock = (data & 0x40);
+ bool clock = (data & 0x40) != 0;
int datline = (data & 0x80);
//Unlike MPU4, this uses positive transitions on both lines, so this may be a similar, but not identical component
diff --git a/src/mame/drivers/igs017.c b/src/mame/drivers/igs017.c
index ce1f5ae7760..3043d767885 100644
--- a/src/mame/drivers/igs017.c
+++ b/src/mame/drivers/igs017.c
@@ -1854,8 +1854,8 @@ READ16_MEMBER(igs017_state::lhzb2a_magic_r)
{
case 0x03:
{
- UINT8 a = BITSWAP8(m_prot[0], 9,9,1,9,2,5,4,7); // 9 means 0 value
- UINT8 b = BITSWAP8(m_prot[1], 5,2,9,7,9,9,9,9);
+ UINT8 a = BITSWAP8((UINT16)m_prot[0], 9,9,1,9,2,5,4,7); // 9 means 0 value
+ UINT8 b = BITSWAP8((UINT16)m_prot[1], 5,2,9,7,9,9,9,9);
return a | b;
}
diff --git a/src/mame/video/galaxia.c b/src/mame/video/galaxia.c
index 09a58dd95da..7afe14c01af 100644
--- a/src/mame/video/galaxia.c
+++ b/src/mame/video/galaxia.c
@@ -210,7 +210,7 @@ SCREEN_UPDATE_IND16( astrowar )
{
// NOTE: similar to zac2650.c, the sprite chip runs at a different frequency than the background generator
// the exact timing ratio is unknown, so we'll have to do with guesswork
- float s_ratio = 256.0 / 196.0;
+ float s_ratio = 256.0f / 196.0f;
float sx = x * s_ratio;
if ((int)(sx + 0.5) > cliprect.max_x)
diff --git a/src/mame/video/gticlub.c b/src/mame/video/gticlub.c
index c68ad1915a7..e1a11e21737 100644
--- a/src/mame/video/gticlub.c
+++ b/src/mame/video/gticlub.c
@@ -1,3 +1,4 @@
+#include <float.h>
#include "emu.h"
#include "cpu/sharc/sharc.h"
#include "machine/konppc.h"
@@ -564,7 +565,7 @@ static void draw_scanline_2d(void *dest, INT32 scanline, const poly_extent *exte
if (color & 0xff000000)
{
fb[x] = color;
- zb[x] = 0x7fffffff; // FIXME
+ zb[x] = FLT_MAX; // FIXME
}
}
}
@@ -609,7 +610,7 @@ static void draw_scanline_2d_tex(void *dest, INT32 scanline, const poly_extent *
if (color & 0xff000000)
{
fb[x] = color;
- zb[x] = 0x7fffffff; // FIXME
+ zb[x] = FLT_MAX; // FIXME
}
u += du;
diff --git a/src/mame/video/rdptpipe.c b/src/mame/video/rdptpipe.c
index 64067e6b599..df412614ff5 100644
--- a/src/mame/video/rdptpipe.c
+++ b/src/mame/video/rdptpipe.c
@@ -1372,7 +1372,7 @@ UINT32 N64TexturePipeT::Fetch(INT32 s, INT32 t, INT32 tilenum, const rdp_poly_st
tbase += tile[tilenum].tmem;
UINT32 tpal = tile[tilenum].palette;
- UINT32 index = (tformat << 4) | (tsize << 2) | (object.OtherModes.en_tlut << 1) | object.OtherModes.tlut_type;
+ UINT32 index = (tformat << 4) | (tsize << 2) | ((UINT32) object.OtherModes.en_tlut << 1) | (UINT32) object.OtherModes.tlut_type;
return ((this)->*(TexelFetch[index]))(s, t, tbase, tpal, userdata);
}