Some warning fixes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4345 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2009-09-29 22:32:53 +00:00
parent 48ed2ae852
commit 076e727376
9 changed files with 19 additions and 17 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1255"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="Lua"
ProjectGUID="{DA4CA030-A741-4DDC-9DA8-B2F351F0F158}"
RootNamespace="Lua"
@ -233,6 +233,7 @@
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
DisableSpecificWarnings="4334;"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="SOIL"
ProjectGUID="{C0B84DA9-FF15-4FAB-9590-17132F3C6DE4}"
RootNamespace="SOIL"
@ -173,6 +173,7 @@
EnableFunctionLevelLinking="false"
WarningLevel="3"
DebugInformationFormat="3"
DisableSpecificWarnings="4018;4267;4224;4244;"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -237,6 +238,7 @@
EnableFunctionLevelLinking="false"
WarningLevel="3"
DebugInformationFormat="3"
DisableSpecificWarnings="4018;4267;4224;4244;"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -1088,8 +1088,8 @@ static void EndField()
void Update()
{
// Update the target refresh rate
TargetRefreshRate = (m_DisplayControlRegister.FMT == 0 || m_DisplayControlRegister.FMT == 2)
? NTSC_FIELD_RATE : PAL_FIELD_RATE;
TargetRefreshRate = (float)((m_DisplayControlRegister.FMT == 0 || m_DisplayControlRegister.FMT == 2)
? NTSC_FIELD_RATE : PAL_FIELD_RATE);
// Calculate actual refresh rate
static u64 LastTick = 0;
@ -1105,7 +1105,7 @@ void Update()
// Multipled by two because of the way TicksPerFrame is calculated (divided by 25 and 30
// rather than 50 and 60)
ActualRefreshRate = ((double)SyncTicksProgress / (double)TicksPerFrame) * 2.0;
ActualRefreshRate = (float)(((double)SyncTicksProgress / (double)TicksPerFrame) * 2.0);
LastTick = CoreTiming::GetTicks();
SyncTicksProgress = 0;
}

View File

@ -150,7 +150,7 @@ InstLoc IRBuilder::EmitZeroOp(unsigned Opcode, unsigned extra = 0) {
InstLoc IRBuilder::EmitUOp(unsigned Opcode, InstLoc Op1, unsigned extra) {
InstLoc curIndex = &InstList[InstList.size()];
unsigned backOp1 = curIndex - 1 - Op1;
unsigned backOp1 = (s32)(curIndex - 1 - Op1);
if (backOp1 >= 256) {
InstList.push_back(Tramp | backOp1 << 8);
backOp1 = 0;
@ -162,13 +162,13 @@ InstLoc IRBuilder::EmitUOp(unsigned Opcode, InstLoc Op1, unsigned extra) {
InstLoc IRBuilder::EmitBiOp(unsigned Opcode, InstLoc Op1, InstLoc Op2, unsigned extra) {
InstLoc curIndex = &InstList[InstList.size()];
unsigned backOp1 = curIndex - 1 - Op1;
unsigned backOp1 = (s32)(curIndex - 1 - Op1);
if (backOp1 >= 255) {
InstList.push_back(Tramp | backOp1 << 8);
backOp1 = 0;
curIndex++;
}
unsigned backOp2 = curIndex - 1 - Op2;
unsigned backOp2 = (s32)(curIndex - 1 - Op2);
if (backOp2 >= 256) {
InstList.push_back(Tramp | backOp2 << 8);
backOp2 = 0;

View File

@ -534,7 +534,7 @@ void CFrame::OnRestart(wxCommandEvent& WXUNUSED (event))
#ifdef _WIN32
char Str[MAX_PATH + 1];
DWORD Size = sizeof(Str)/sizeof(char);
DWORD n = GetModuleFileNameA(NULL, Str, Size);
//DWORD n = GetModuleFileNameA(NULL, Str, Size);
ShellExecuteA(NULL, "open", PathToFilename(*new std::string(Str)).c_str(), g_pCodeWindow ? "" : "-d", NULL, SW_SHOW);
#endif

View File

@ -638,7 +638,7 @@ void CISOProperties::ExportDir(const char* _rFullPath, const char* _rExportFolde
if (!_rFullPath) // Extract all
{
index[0] = 0;
index[1] = fst.size();
index[1] = (u32)fst.size();
FS->ExportApploader(_rExportFolder);
}

View File

@ -283,10 +283,8 @@ void CLogWindow::UpdateChecks()
void CLogWindow::UnPopulateRight()
{
// Use ->Detach instead, as per sizer.h?
sRight->Remove(m_Log);
sRight->Remove(sRightBottom);
// Remove() destroys sizers
sRight->Detach(m_Log);
sRight->Detach(sRightBottom);
sRightBottom = new wxBoxSizer(wxHORIZONTAL);
}
void CLogWindow::PopulateRight()
@ -445,10 +443,9 @@ void CLogWindow::OnLogTimer(wxTimerEvent& WXUNUSED(event))
if (!m_LogAccess) return;
//m_Log->Freeze();
int MsgSz = msgQueue.size();
UpdateLog();
// Better auto scroll than wxTE_AUTO_SCROLL
if (MsgSz > 0)
if (msgQueue.size() > 0)
{
m_Log->ScrollLines(1);
m_Log->ShowPosition( m_Log->GetLastPosition() );

View File

@ -76,6 +76,7 @@
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings="4005;"
ForcedIncludeFiles="stdafx.h"
/>
<Tool
@ -186,6 +187,7 @@
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
DisableSpecificWarnings="4005;"
ForcedIncludeFiles="stdafx.h"
/>
<Tool

View File

@ -116,7 +116,7 @@ struct TabDirect3D : public W32Util::Tab
g_Config.bWireFrame = Button_GetCheck(GetDlgItem(hDlg,IDC_WIREFRAME)) ? true : false;
break;
case IDC_SAFE_TEXTURE_CACHE:
g_Config.bSafeTextureCache = Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE));
g_Config.bSafeTextureCache = Button_GetCheck(GetDlgItem(hDlg, IDC_SAFE_TEXTURE_CACHE)) == 0 ? false : true;
break;
default:
break;