Fix some build warnings generated by g++

This commit is contained in:
Ari Sundholm 2017-09-09 14:17:55 +03:00
parent 60aabb91d7
commit d7394bc7b9
4 changed files with 6 additions and 6 deletions

View File

@ -51,8 +51,8 @@ void SMP::op_write(uint16 addr, uint8 data) {
void SMP::op_step() { void SMP::op_step() {
#define op_readpc() op_read(regs.pc++) #define op_readpc() op_read(regs.pc++)
#define op_readdp(addr) op_read((regs.p.p << 8) + (addr & 0xff)) #define op_readdp(addr) op_read((regs.p.p << 8) + ((addr) & 0xff))
#define op_writedp(addr, data) op_write((regs.p.p << 8) + (addr & 0xff), data) #define op_writedp(addr, data) op_write((regs.p.p << 8) + ((addr) & 0xff), data)
#define op_readaddr(addr) op_read(addr) #define op_readaddr(addr) op_read(addr)
#define op_writeaddr(addr, data) op_write(addr, data) #define op_writeaddr(addr, data) op_write(addr, data)
#define op_readstack() op_read(0x0100 | ++regs.sp) #define op_readstack() op_read(0x0100 | ++regs.sp)

View File

@ -270,7 +270,7 @@ bool8 LoadZip (const char *zipname, uint32 *TotalFileSize, uint8 *buffer)
uint8 *ptr = buffer; uint8 *ptr = buffer;
bool8 more = FALSE; bool8 more = FALSE;
unzLocateFile(file, filename, NULL); unzLocateFile(file, filename, 0);
unzGetCurrentFileInfo(file, &info, filename, 128, NULL, 0, NULL, 0); unzGetCurrentFileInfo(file, &info, filename, 128, NULL, 0, NULL, 0);
if (unzOpenCurrentFile(file) != UNZ_OK) if (unzOpenCurrentFile(file) != UNZ_OK)
@ -330,7 +330,7 @@ bool8 LoadZip (const char *zipname, uint32 *TotalFileSize, uint8 *buffer)
if (more) if (more)
{ {
if (unzLocateFile(file, filename, NULL) != UNZ_OK || if (unzLocateFile(file, filename, 0) != UNZ_OK ||
unzGetCurrentFileInfo(file, &info, filename, 128, NULL, 0, NULL, 0) != UNZ_OK || unzGetCurrentFileInfo(file, &info, filename, 128, NULL, 0, NULL, 0) != UNZ_OK ||
unzOpenCurrentFile(file) != UNZ_OK) unzOpenCurrentFile(file) != UNZ_OK)
break; break;

View File

@ -240,7 +240,7 @@ static int unzFindExtension(unzFile &file, const char *ext, bool restart = TRUE,
} }
#endif #endif
STREAM S9xMSU1OpenFile(char *msu_ext, bool skip_unpacked) STREAM S9xMSU1OpenFile(const char *msu_ext, bool skip_unpacked)
{ {
const char *filename = S9xGetFilename(msu_ext, ROMFILENAME_DIR); const char *filename = S9xGetFilename(msu_ext, ROMFILENAME_DIR);
STREAM file = 0; STREAM file = 0;

2
msu1.h
View File

@ -229,7 +229,7 @@ extern struct SMSU1 MSU1;
void S9xResetMSU(void); void S9xResetMSU(void);
void S9xMSU1Init(void); void S9xMSU1Init(void);
bool S9xMSU1ROMExists(void); bool S9xMSU1ROMExists(void);
STREAM S9xMSU1OpenFile(char *msu_ext, bool skip_unpacked = FALSE); STREAM S9xMSU1OpenFile(const char *msu_ext, bool skip_unpacked = FALSE);
void S9xMSU1Init(void); void S9xMSU1Init(void);
void S9xMSU1Generate(size_t sample_count); void S9xMSU1Generate(size_t sample_count);
uint8 S9xMSU1ReadPort(uint8 port); uint8 S9xMSU1ReadPort(uint8 port);