mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
allow gcc to check the format of args being passed to MsgAlert and GenericLog. Fixed nearly all warnings that arose from this, as well as some preexisting ones (some were actually crashes and/or bugs...)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6522 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -343,7 +343,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
|
||||
break;
|
||||
|
||||
case 0x0003:
|
||||
DEBUG_LOG(DSPHLE, "%08x : AXLIST command 0x0003 ????");
|
||||
DEBUG_LOG(DSPHLE, "%08x : AXLIST command 0x0003 ????", uAddress);
|
||||
break;
|
||||
|
||||
case 0x0004: // AUX?
|
||||
@ -377,7 +377,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
|
||||
case 0x0009:
|
||||
Addr__9 = Memory_Read_U32(uAddress);
|
||||
uAddress += 4;
|
||||
DEBUG_LOG(DSPHLE, "%08x : AXLIST 6 address: %08x", Addr__9);
|
||||
DEBUG_LOG(DSPHLE, "%08x : AXLIST 6 address: %08x", uAddress, Addr__9);
|
||||
break;
|
||||
|
||||
case AXLIST_COMPRESSORTABLE: // 0xa
|
||||
@ -438,7 +438,7 @@ bool CUCode_AX::AXTask(u32& _uMail)
|
||||
num += 2;
|
||||
}
|
||||
|
||||
PanicAlert(szTemp);
|
||||
PanicAlert("%s", szTemp);
|
||||
// bFirst = false;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ void CUCode_CARD::HandleMail(u32 _uMail)
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown cmd: %x (size %i)", _uMail);
|
||||
DEBUG_LOG(DSPHLE, "CUCode_CARD - unknown cmd: %x", _uMail);
|
||||
}
|
||||
|
||||
m_rMailHandler.PushMail(DSP_DONE);
|
||||
|
@ -515,8 +515,8 @@ void OpenGL_ReportARBProgramError()
|
||||
GLint loc = 0;
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
||||
ERROR_LOG(VIDEO, "program error at %d: ", loc);
|
||||
ERROR_LOG(VIDEO, (char*)pstr);
|
||||
ERROR_LOG(VIDEO, "");
|
||||
ERROR_LOG(VIDEO, "%s", (char*)pstr);
|
||||
ERROR_LOG(VIDEO, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||
if (!cgIsProgram(tempprog)) {
|
||||
cgDestroyProgram(tempprog);
|
||||
ERROR_LOG(VIDEO, "Failed to compile ps %s:", cgGetLastListing(g_cgcontext));
|
||||
ERROR_LOG(VIDEO, pstrprogram);
|
||||
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||
if (cgGetError() != CG_NO_ERROR)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Warnings on compile ps %s:", cgGetLastListing(g_cgcontext));
|
||||
WARN_LOG(VIDEO, pstrprogram);
|
||||
WARN_LOG(VIDEO, "%s", pstrprogram);
|
||||
}
|
||||
|
||||
// This looks evil - we modify the program through the const char * we got from cgGetProgramString!
|
||||
@ -304,8 +304,8 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||
ERROR_LOG(VIDEO, "Hit limit? %i", native_limit);
|
||||
// TODO
|
||||
}
|
||||
ERROR_LOG(VIDEO, pstrprogram);
|
||||
ERROR_LOG(VIDEO, pcompiledprog);
|
||||
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||
ERROR_LOG(VIDEO, "%s", pcompiledprog);
|
||||
}
|
||||
|
||||
cgDestroyProgram(tempprog);
|
||||
|
@ -247,8 +247,8 @@ Renderer::Renderer()
|
||||
}
|
||||
|
||||
INFO_LOG(VIDEO, "Supported OpenGL Extensions:");
|
||||
INFO_LOG(VIDEO, ptoken); // write to the log file
|
||||
INFO_LOG(VIDEO, "");
|
||||
INFO_LOG(VIDEO, "%s", ptoken); // write to the log file
|
||||
INFO_LOG(VIDEO, "\n");
|
||||
|
||||
OSD::AddMessage(StringFromFormat("Video Info: %s, %s, %s",
|
||||
glGetString(GL_VENDOR),
|
||||
|
@ -169,14 +169,14 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
|
||||
}
|
||||
cgDestroyProgram(tempprog);
|
||||
ERROR_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
|
||||
ERROR_LOG(VIDEO, pstrprogram);
|
||||
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cgGetError() != CG_NO_ERROR)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Failed to load vs %s:", cgGetLastListing(g_cgcontext));
|
||||
WARN_LOG(VIDEO, pstrprogram);
|
||||
WARN_LOG(VIDEO, "%s", pstrprogram);
|
||||
}
|
||||
|
||||
// This looks evil - we modify the program through the const char * we got from cgGetProgramString!
|
||||
@ -194,8 +194,8 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
|
||||
glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(pcompiledprog), pcompiledprog);
|
||||
err = GL_REPORT_ERROR();
|
||||
if (err != GL_NO_ERROR) {
|
||||
ERROR_LOG(VIDEO, pstrprogram);
|
||||
ERROR_LOG(VIDEO, pcompiledprog);
|
||||
ERROR_LOG(VIDEO, "%s", pstrprogram);
|
||||
ERROR_LOG(VIDEO, "%s", pcompiledprog);
|
||||
}
|
||||
|
||||
cgDestroyProgram(tempprog);
|
||||
|
@ -439,8 +439,8 @@ void OpenGL_ReportARBProgramError()
|
||||
GLint loc = 0;
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &loc);
|
||||
ERROR_LOG(VIDEO, "program error at %d: ", loc);
|
||||
ERROR_LOG(VIDEO, (char*)pstr);
|
||||
ERROR_LOG(VIDEO, "");
|
||||
ERROR_LOG(VIDEO, "%s", (char*)pstr);
|
||||
ERROR_LOG(VIDEO, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user