fix compile warnings from devkit r18

This commit is contained in:
giantpune 2009-10-14 21:59:13 +00:00
parent cec8a231e7
commit 7b0af4f19d
7 changed files with 22 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source\sysmenu" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="false"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="false"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="false"></e><e p="gui\source\patches" x="false"></e></ViewState></pd>
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="false"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="false"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="false"></e><e p="gui\source\patches" x="false"></e></ViewState></pd>

View File

@ -436,8 +436,8 @@ void GuiButton::Update(GuiTrigger * t)
cc_btns_trig = trigger[i]->wpad.btns_d >> 16;
if(
(t->wpad.btns_d > 0 &&
wm_btns == wm_btns_trig ||
((t->wpad.btns_d > 0 &&
wm_btns == wm_btns_trig) ||
(cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) ||
(t->pad.btns_d == trigger[i]->pad.btns_d && t->pad.btns_d > 0))
{
@ -489,8 +489,8 @@ void GuiButton::Update(GuiTrigger * t)
cc_btns_trig = trigger[i]->wpad.btns_h >> 16;
if(
(t->wpad.btns_d > 0 &&
wm_btns == wm_btns_trig ||
((t->wpad.btns_d > 0 &&
wm_btns == wm_btns_trig) ||
(cc_btns == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) ||
(t->pad.btns_d == trigger[i]->pad.btns_h && t->pad.btns_d > 0))
{
@ -500,8 +500,8 @@ void GuiButton::Update(GuiTrigger * t)
}
if(
(t->wpad.btns_h > 0 &&
wm_btns_h == wm_btns_trig ||
((t->wpad.btns_h > 0 &&
wm_btns_h == wm_btns_trig) ||
(cc_btns_h == cc_btns_trig && t->wpad.exp.type == EXP_CLASSIC)) ||
(t->pad.btns_h == trigger[i]->pad.btns_h && t->pad.btns_h > 0))
{

View File

@ -359,7 +359,8 @@ s32 bwDVD_LowSeek(u32 offset,dvdcallbacklow cb)
s32 bwDVD_LowOffset(u64 offset,dvdcallbacklow cb)
{
s32 ret;
u32 *off = (u32*)(void*)(&offset);
//u32 *off = (u32*)(void*)(&offset);
union { u64 off64; u32 off32[2]; } off;off.off64 = offset;
struct dicontext *ctx;
struct dicommand *cmd;
@ -371,8 +372,8 @@ s32 bwDVD_LowOffset(u64 offset,dvdcallbacklow cb)
cmd = ctx->cmd;
cmd->diReg[0] = (IOCTL_DI_OFFSET<<24);
cmd->diReg[1] = 0;
if(off[0]) cmd->diReg[1] = 1;
cmd->diReg[2] = off[1];
if(off.off32[0]) cmd->diReg[1] = 1;
cmd->diReg[2] = off.off32[1];
ret = IOS_IoctlAsync(__dvd_fd,IOCTL_DI_OFFSET,cmd->diReg,sizeof(struct dicommand),__di_regvalcache,0x20,__dvd_iostransactionCB,ctx);
return ret;

View File

@ -11,6 +11,7 @@
#include "listfiles.h"
#include "xml/xml.h" /* XML - Lustar*/
#include "cfg.h"
#define isspace2(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v')
struct SSettings Settings;
@ -416,14 +417,14 @@ u8 get_block(struct discHdr *header) {
char* trim_n_copy(char *dest, char *src, int n, int size) {
int len;
// trim leading white space
while (isspace(*src)) {
while (isspace2(*src)) {
src++;
n--;
}
len = strlen(src);
if (len > n) len = n;
// trim trailing white space
while (len > 0 && isspace(src[len-1])) len--;
while (len > 0 && isspace2(src[len-1])) len--;
if (len >= size) len = size-1;
strlcpy(dest, src, len+1);
//printf("trim_copy: '%s' %d\n", dest, len); //sleep(1);

View File

@ -116,15 +116,16 @@ s32 WDVD_Seek(u64 offset) {
}
s32 WDVD_Offset(u64 offset) {
u32 *off = (u32 *)((void *)&offset);
//u32 *off = (u32 *)((void *)&offset);
union { u64 off64; u32 off32[2]; } off;off.off64 = offset;
s32 ret;
memset(inbuf, 0, sizeof(inbuf));
/* Set offset */
inbuf[0] = IOCTL_DI_OFFSET << 24;
inbuf[1] = (off[0]) ? 1: 0;
inbuf[2] = (off[1] >> 2);
inbuf[1] = (off.off32[0]) ? 1: 0;
inbuf[2] = (off.off32[1] >> 2);
ret = IOS_Ioctl(di_fd, IOCTL_DI_OFFSET, inbuf, sizeof(inbuf), outbuf, sizeof(outbuf));
if (ret < 0)

View File

@ -475,7 +475,7 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
++gameinfo.wifiCnt;
GetTextFromNode(nodeidtmp, nodedata, "feature", NULL, NULL, MXML_DESCEND, gameinfo.wififeatures[gameinfo.wifiCnt],
sizeof(gameinfo.wififeatures[gameinfo.wifiCnt]));
gameinfo.wififeatures[gameinfo.wifiCnt][0] = toupper(gameinfo.wififeatures[gameinfo.wifiCnt][0]);
gameinfo.wififeatures[gameinfo.wifiCnt][0] = toupper((int)gameinfo.wififeatures[gameinfo.wifiCnt][0]);
if (gameinfo.wifiCnt == XML_ELEMMAX)
break;
}
@ -542,14 +542,14 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
++gameinfo.genreCnt;
trimcopy(splitresult,splitresult,strlen(splitresult)+1);
strlcpy(gameinfo.genresplit[gameinfo.genreCnt],splitresult,sizeof(gameinfo.genresplit[gameinfo.genreCnt]));
gameinfo.genresplit[gameinfo.genreCnt][0] = toupper(gameinfo.genresplit[gameinfo.genreCnt][0]);
gameinfo.genresplit[gameinfo.genreCnt][0] = toupper((int)gameinfo.genresplit[gameinfo.genreCnt][0]);
while (splitresult != NULL) {
splitresult = strtok(NULL, delimgenre);
if (splitresult != NULL && strcmp(splitresult,"")!=0) {
++gameinfo.genreCnt;
trimcopy(splitresult,splitresult,strlen(splitresult)+1);
strlcpy(gameinfo.genresplit[gameinfo.genreCnt],splitresult,sizeof(gameinfo.genresplit[gameinfo.genreCnt]));
gameinfo.genresplit[gameinfo.genreCnt][0] = toupper(gameinfo.genresplit[gameinfo.genreCnt][0]);
gameinfo.genresplit[gameinfo.genreCnt][0] = toupper((int)gameinfo.genresplit[gameinfo.genreCnt][0]);
if (gameinfo.genreCnt == XML_ELEMMAX)
break;
}