[Gamecube/Wii] fixed compilation errors/warnings with latest devkitPPC (r24)

This commit is contained in:
ekeeke 2019-03-23 14:32:34 +01:00
parent 6ec124760f
commit d927c6e4cb
17 changed files with 30 additions and 36 deletions

View File

@ -89,13 +89,13 @@ export OFILES := $(addsuffix .o,$(BINFILES)) \
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC) -I$(PORTLIBS)/include
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean

View File

@ -93,13 +93,13 @@ export OFILES := $(addsuffix .o,$(BINFILES)) \
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC) -I$(PORTLIBS)/include
-I$(LIBOGC_INC)
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
-L$(LIBOGC_LIB)
export OUTPUT := $(CURDIR)/$(TARGET)
.PHONY: $(BUILD) clean

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

View File

@ -555,11 +555,8 @@ static u32 pm_io(int reg, int write, u32 d)
elprintf(EL_SVP, "ssp ROM r [%06x] %04x", CADDR,
((unsigned short *)cart.rom)[addr|((mode&0xf)<<16)]);
#endif
/*if ((signed int)ssp->pmac_read[reg] >> 16 == -1) ssp->pmac_read[reg]++;
ssp->pmac_read[reg] += 1<<16;*/
if ((signed int)(ssp->pmac[0][reg] & 0xffff) == -1) ssp->pmac[0][reg] += 1<<16;
ssp->pmac[0][reg] ++;
d = ((unsigned short *)cart.rom)[addr|((mode&0xf)<<16)];
}
else if ((mode & 0x47ff) == 0x0018) /* DRAM */

View File

@ -1145,7 +1145,7 @@ int cdd_load(char *filename, char *header)
}
/* Automatically try to open associated subcode data file */
strncpy(&fname[strlen(fname) - 4], ".sub", 4);
memcpy(&fname[strlen(fname) - 4], ".sub", 4);
cdd.toc.sub = cdStreamOpen(fname);
/* return 1 if loaded file is CD image file */

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Savestate support
*
* Copyright (C) 2007-2016 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2019 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -197,7 +197,7 @@ int state_save(unsigned char *state)
/* version string */
char version[16];
strncpy(version,STATE_VERSION,16);
memcpy(version,STATE_VERSION,16);
save_param(version, 16);
/* GENESIS */
@ -260,8 +260,8 @@ int state_save(unsigned char *state)
if (system_hw == SYSTEM_MCD)
{
/* CD hardware ID flag */
char id[5];
strncpy(id,"SCD!",4);
char id[4];
memcpy(id,"SCD!",4);
save_param(id, 4);
/* CD hardware */

View File

@ -2,7 +2,7 @@
* Genesis Plus
* Savestate support
*
* Copyright (C) 2007-2016 Eke-Eke (Genesis Plus GX)
* Copyright (C) 2007-2019 Eke-Eke (Genesis Plus GX)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:

View File

@ -3,7 +3,7 @@
*
* Genesis Plus GX configuration file support
*
* Copyright Eke-Eke (2007-2017)
* Copyright Eke-Eke (2007-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -95,7 +95,7 @@ void config_save(void)
void config_default(void)
{
/* version TAG */
strncpy(config.version,CONFIG_VERSION,16);
memcpy(config.version,CONFIG_VERSION,16);
/* sound options */
config.psg_preamp = 150;

View File

@ -3,7 +3,7 @@
*
* Genesis Plus GX configuration file support
*
* Copyright Eke-Eke (2007-2017)
* Copyright Eke-Eke (2007-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:

View File

@ -3,7 +3,7 @@
*
* File loading support
*
* Copyright Eke-Eke (2008-2014)
* Copyright Eke-Eke (2008-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -223,7 +223,7 @@ static int FileSortCallback(const void *f1, const void *f2)
if(((FILEENTRIES *)f1)->flags && !((FILEENTRIES *)f2)->flags) return -1;
if(!((FILEENTRIES *)f1)->flags && ((FILEENTRIES *)f2)->flags) return 1;
return stricmp(((FILEENTRIES *)f1)->filename, ((FILEENTRIES *)f2)->filename);
return strcasecmp(((FILEENTRIES *)f1)->filename, ((FILEENTRIES *)f2)->filename);
}
/***************************************************************************
@ -247,11 +247,7 @@ int UpdateDirectory(bool go_up, char *dirname)
while (test != NULL)
{
size = strlen(test);
if (dirname)
{
strncpy(dirname,test,size);
dirname[size] = 0;
}
strcpy(dirname,test);
test = strtok(NULL,"/");
}
@ -265,7 +261,8 @@ int UpdateDirectory(bool go_up, char *dirname)
else
{
/* by default, simply append folder name */
sprintf(fileDir, "%s%s/",fileDir, dirname);
const char *path = (const char *)fileDir;
snprintf(fileDir, MAXPATHLEN, "%s%s/", path, (const char *)dirname);
}
return 1;

View File

@ -3,7 +3,7 @@
*
* File loading support
*
* Copyright Eke-Eke (2008-2014)
* Copyright Eke-Eke (2008-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:

View File

@ -3,7 +3,7 @@
*
* Genesis Plus GX Cheats menu
*
* Copyright Eke-Eke (2010-2014)
* Copyright Eke-Eke (2010-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -803,7 +803,7 @@ void CheatMenu(void)
int i, update = 0;
int digit_cnt = 0;
int max = 0;
char temp[256];
char temp[MAXPATHLEN];
char *str = NULL;
gui_menu *m = &menu_cheats;
@ -1352,7 +1352,7 @@ void CheatMenu(void)
apply_cheats();
/* save cheats to file */
sprintf(temp, "%s/cheats/%s.pat", DEFAULT_PATH, rom_filename);
snprintf(temp, MAXPATHLEN, "%s/cheats/%s.pat", DEFAULT_PATH, rom_filename);
if (maxcheats)
{
@ -1401,13 +1401,13 @@ void CheatLoad(void)
{
int len;
int cnt = 0;
char temp[256];
char temp[MAXPATHLEN];
/* reset cheat count */
maxcheats = 0;
/* make cheat filename */
sprintf(temp, "%s/cheats/%s.pat", DEFAULT_PATH, rom_filename);
snprintf(temp, MAXPATHLEN, "%s/cheats/%s.pat", DEFAULT_PATH, rom_filename);
/* open file */
FILE *f = fopen(temp, "r");

View File

@ -3,7 +3,7 @@
*
* Genesis Plus GX Cheats menu
*
* Copyright Eke-Eke (2010-2014)
* Copyright Eke-Eke (2010-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:

View File

@ -3,7 +3,7 @@
*
* generic GUI Engine (using GX rendering)
*
* Copyright Eke-Eke (2009-2014)
* Copyright Eke-Eke (2009-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@ -1800,9 +1800,9 @@ static void *MsgBox_Thread(gui_message *message_box)
void GUI_MsgBoxUpdate(char *title, char *msg)
{
if (title)
strncpy(message_box.title,title,64);
strncpy(message_box.title,title,63);
if (msg)
strncpy(message_box.msg,msg,64);
strncpy(message_box.msg,msg,63);
}
/* setup current Message Box */

View File

@ -3,7 +3,7 @@
*
* generic GUI Engine (using GX rendering)
*
* Copyright Eke-Eke (2009-2014)
* Copyright Eke-Eke (2009-2019)
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met: