diff --git a/Externals/Bochs_disasm/PowerPCDisasm.cpp b/Externals/Bochs_disasm/PowerPCDisasm.cpp index 70313af132..1490d30e93 100644 --- a/Externals/Bochs_disasm/PowerPCDisasm.cpp +++ b/Externals/Bochs_disasm/PowerPCDisasm.cpp @@ -48,7 +48,7 @@ namespace PPCDisasm /* typedefs */ - typedef unsigned long ppc_word; + typedef unsigned int ppc_word; #undef BIGENDIAN #undef LITTTLEENDIAN @@ -281,7 +281,7 @@ namespace PPCDisasm static void ill(struct DisasmPara_PPC *dp,ppc_word in) { // strcpy(dp->opcode,".word"); - // sprintf(dp->operands,"0x%08lx",(unsigned long)in); + // sprintf(dp->operands,"0x%08lx",(unsigned int)in); strcpy(dp->opcode,""); sprintf(dp->operands,""); @@ -480,7 +480,7 @@ namespace PPCDisasm static void bc(struct DisasmPara_PPC *dp,ppc_word in) { - unsigned long d = (int)(in & 0xfffc); + unsigned int d = (int)(in & 0xfffc); int offs; char *oper = dp->operands; @@ -491,9 +491,9 @@ namespace PPCDisasm *oper++ = ','; } if (in & 2) /* AA ? */ - sprintf(dp->operands,"->0x%.8X",(unsigned long)d); + sprintf(dp->operands,"->0x%.8X",(unsigned int)d); else - sprintf(oper,"->0x%.8X",(unsigned long)(*dp->iaddr) + d); + sprintf(oper,"->0x%.8X",(unsigned int)(*dp->iaddr) + d); dp->type = PPCINSTR_BRANCH; dp->displacement = (ppc_word)d; } @@ -501,15 +501,15 @@ namespace PPCDisasm static void bli(struct DisasmPara_PPC *dp,ppc_word in) { - unsigned long d = (unsigned long)(in & 0x3fffffc); + unsigned int d = (unsigned int)(in & 0x3fffffc); if(d & 0x02000000) d |= 0xfc000000; sprintf(dp->opcode,"b%s",b_ext[in&3]); if (in & 2) /* AA ? */ - sprintf(dp->operands,"->0x%.8X",(unsigned long)d); + sprintf(dp->operands,"->0x%.8X",(unsigned int)d); else - sprintf(dp->operands,"->0x%.8X",(unsigned long)(*dp->iaddr) + d); + sprintf(dp->operands,"->0x%.8X",(unsigned int)(*dp->iaddr) + d); dp->type = PPCINSTR_BRANCH; dp->displacement = (ppc_word)d; } @@ -813,7 +813,7 @@ namespace PPCDisasm sprintf(dp->operands,"%s, %s, %d",regnames[a],regnames[s],bsh); } - static const char *ldst_offs(unsigned long val) + static const char *ldst_offs(unsigned int val) { static char buf[8]; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index f19c2fc25e..c8b5ec1117 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -73,10 +73,10 @@ CUCode_AX::~CUCode_AX() // ---------------- void CUCode_AX::SaveLogFile(std::string f, int resizeTo, bool type, bool Wii) { - if(gpName.length() > 0) // thios is currently off in the Release build + if (gpName.length() > 0) // this is currently off in the Release build { - std::ostringstream ci; - std::ostringstream cType; + std::ostringstream ci; + std::ostringstream cType; ci << (resizeTo - 1); // write ci cType << type; // write cType @@ -86,7 +86,7 @@ void CUCode_AX::SaveLogFile(std::string f, int resizeTo, bool type, bool Wii) FileName += Wii ? "_sepWii_sep" : "_sepGC_sep"; FileName += ".log"; FILE* fhandle = fopen(FileName.c_str(), "w"); - fprintf(fhandle, f.c_str()); + fprintf(fhandle, "%s", f.c_str()); fflush(fhandle); fhandle = NULL; } }