diff options
| author | omegadox <omegadox@gmail.com> | 2009-01-24 00:45:46 +0000 |
|---|---|---|
| committer | omegadox <omegadox@gmail.com> | 2009-01-24 00:45:46 +0000 |
| commit | 8f98f0b778dcf600febdc6b2fe6ec9d122406f29 (patch) | |
| tree | b567f2189ab0449c0829fc937d3c627d355425c4 /Source/Core | |
| parent | 70bc8167f8af6aa053b9335209c80f554d8fb597 (diff) | |
Some warning and code cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1998 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/Common.vcproj | 4 | ||||
| -rw-r--r-- | Source/Core/Common/Src/ChunkFile.h | 4 | ||||
| -rw-r--r-- | Source/Core/Common/Src/ConsoleWindow.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Src/ExtendedTrace.cpp | 16 | ||||
| -rw-r--r-- | Source/Core/Core/Src/ARDecrypt.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/DebuggerWX.vcproj | 46 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/Src/Debugger.cpp | 19 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/Src/MemoryView.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DebuggerWX/Src/SConscript | 1 | ||||
| -rw-r--r-- | Source/Core/DiscIO/Src/BannerLoader.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/DiscIO/Src/VolumeDirectory.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Src/GameListCtrl.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Src/ISOProperties.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinWX/Src/Main.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/Fifo.cpp | 2 |
16 files changed, 69 insertions, 53 deletions
diff --git a/Source/Core/Common/Common.vcproj b/Source/Core/Common/Common.vcproj index 8e1c43c000..94f460401e 100644 --- a/Source/Core/Common/Common.vcproj +++ b/Source/Core/Common/Common.vcproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
- Version="9,00"
+ Version="9.00"
Name="Common"
ProjectGUID="{C573CAF7-EE6A-458E-8049-16C0BF34C2E9}"
RootNamespace="Common"
@@ -293,7 +293,7 @@ />
<Tool
Name="VCLibrarianTool"
- AdditionalDependencies="wsock32.lib winmm.lib"
+ AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/Common.lib"
/>
<Tool
diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h index a892f8528b..8aa18ba618 100644 --- a/Source/Core/Common/Src/ChunkFile.h +++ b/Source/Core/Common/Src/ChunkFile.h @@ -172,7 +172,7 @@ public: } // get size - int sz = FileSize - sizeof(SChunkHeader); + int sz = (int)(FileSize - sizeof(SChunkHeader)); if (Header.ExpectedSize != sz) { fclose(pFile); @@ -213,7 +213,7 @@ public: SChunkHeader Header; Header.Compress = 0; Header.Revision = _Revision; - Header.ExpectedSize = sz; + Header.ExpectedSize = (int)sz; fwrite(&Header, sizeof(SChunkHeader), 1, pFile); fwrite(buffer, sz, 1, pFile); diff --git a/Source/Core/Common/Src/ConsoleWindow.cpp b/Source/Core/Common/Src/ConsoleWindow.cpp index 0a921d3686..773a047bf7 100644 --- a/Source/Core/Common/Src/ConsoleWindow.cpp +++ b/Source/Core/Common/Src/ConsoleWindow.cpp @@ -126,7 +126,7 @@ int Print(const char *fmt, ...) // ----------------
if(__hStdOut)
{
- WriteConsole(__hStdOut, s, strlen(s), &cCharsWritten, NULL);
+ WriteConsole(__hStdOut, s, (DWORD)strlen(s), &cCharsWritten, NULL);
}
// ----------------------------------------
diff --git a/Source/Core/Common/Src/ExtendedTrace.cpp b/Source/Core/Common/Src/ExtendedTrace.cpp index 2c119a1d86..ac774a5b42 100644 --- a/Source/Core/Common/Src/ExtendedTrace.cpp +++ b/Source/Core/Common/Src/ExtendedTrace.cpp @@ -325,8 +325,8 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file ) etfprint(file, "Call stack info: \n"); etfprint(file, lpszMessage); - GetFunctionInfoFromAddresses( callStack.AddrPC.Offset, callStack.AddrFrame.Offset, symInfo ); - GetSourceInfoFromAddress( callStack.AddrPC.Offset, srcInfo ); + GetFunctionInfoFromAddresses( (ULONG)callStack.AddrPC.Offset, (ULONG)callStack.AddrFrame.Offset, symInfo ); + GetSourceInfoFromAddress( (ULONG)callStack.AddrPC.Offset, srcInfo ); etfprint(file, string(" ") + srcInfo + string(" : ") + symInfo + string("\n")); for( ULONG index = 0; ; index++ ) @@ -348,8 +348,8 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file ) if( !bResult || callStack.AddrFrame.Offset == 0 ) break; - GetFunctionInfoFromAddresses( callStack.AddrPC.Offset, callStack.AddrFrame.Offset, symInfo ); - GetSourceInfoFromAddress( callStack.AddrPC.Offset, srcInfo ); + GetFunctionInfoFromAddresses( (ULONG)callStack.AddrPC.Offset, (ULONG)callStack.AddrFrame.Offset, symInfo ); + GetSourceInfoFromAddress( (UINT)callStack.AddrPC.Offset, srcInfo ); etfprint(file, string(" ") + srcInfo + string(" : ") + symInfo + string("\n")); } @@ -386,8 +386,8 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file, DWORD eip, DWO etfprint(file, "Call stack info: \n"); etfprint(file, lpszMessage); - GetFunctionInfoFromAddresses( callStack.AddrPC.Offset, callStack.AddrFrame.Offset, symInfo ); - GetSourceInfoFromAddress( callStack.AddrPC.Offset, srcInfo ); + GetFunctionInfoFromAddresses( (ULONG)callStack.AddrPC.Offset, (ULONG)callStack.AddrFrame.Offset, symInfo ); + GetSourceInfoFromAddress( (UINT)callStack.AddrPC.Offset, srcInfo ); etfprint(file, string(" ") + srcInfo + string(" : ") + symInfo + string("\n")); for( ULONG index = 0; ; index++ ) @@ -409,8 +409,8 @@ void StackTrace( HANDLE hThread, LPCTSTR lpszMessage, FILE *file, DWORD eip, DWO if( !bResult || callStack.AddrFrame.Offset == 0 ) break; - GetFunctionInfoFromAddresses( callStack.AddrPC.Offset, callStack.AddrFrame.Offset, symInfo ); - GetSourceInfoFromAddress( callStack.AddrPC.Offset, srcInfo ); + GetFunctionInfoFromAddresses( (ULONG)callStack.AddrPC.Offset, (ULONG)callStack.AddrFrame.Offset, symInfo ); + GetSourceInfoFromAddress( (UINT)callStack.AddrPC.Offset, srcInfo ); etfprint(file, string(" ") + srcInfo + string(" : ") + symInfo + string("\n")); } diff --git a/Source/Core/Core/Src/ARDecrypt.cpp b/Source/Core/Core/Src/ARDecrypt.cpp index 7ec28254f2..7bf21ac94e 100644 --- a/Source/Core/Core/Src/ARDecrypt.cpp +++ b/Source/Core/Core/Src/ARDecrypt.cpp @@ -406,7 +406,7 @@ int GetVal(const char *flt, char chr) { int ret; - ret = (strchr(flt,chr) - flt); + ret = (int)(strchr(flt,chr) - flt); switch (ret) { case 32: // 'I' diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp index ee02797f7c..1a7dc05d67 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp @@ -655,7 +655,7 @@ int s = inst.RS; if (gpr.R(s).IsImm() && !inst.Rc) { - unsigned result = gpr.R(s).offset; + unsigned result = (int)gpr.R(s).offset; if (inst.SH != 0) result = _rotl(result, inst.SH); result &= Helper_Mask(inst.MB, inst.ME); diff --git a/Source/Core/DebuggerWX/DebuggerWX.vcproj b/Source/Core/DebuggerWX/DebuggerWX.vcproj index f71ee20ce3..055de87318 100644 --- a/Source/Core/DebuggerWX/DebuggerWX.vcproj +++ b/Source/Core/DebuggerWX/DebuggerWX.vcproj @@ -265,7 +265,7 @@ />
<Tool
Name="VCLibrarianTool"
- AdditionalDependencies="comctl32.lib rpcrt4.lib"
+ AdditionalDependencies="rpcrt4.lib"
/>
<Tool
Name="VCALinkTool"
@@ -464,22 +464,62 @@ <File
RelativePath=".\resources\toolbar_add_breakpoint.c"
>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\resources\toolbar_add_memorycheck.c"
>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\resources\toolbar_delete.c"
>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\resources\toolbar_pause.c"
>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
<File
RelativePath=".\resources\toolbar_play.c"
>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
</File>
</Filter>
<File
@@ -551,10 +591,6 @@ >
</File>
<File
- RelativePath=".\src\Debugger.cpp"
- >
- </File>
- <File
RelativePath=".\src\Debugger.h"
>
</File>
diff --git a/Source/Core/DebuggerWX/Src/Debugger.cpp b/Source/Core/DebuggerWX/Src/Debugger.cpp deleted file mode 100644 index 2bf8df55ff..0000000000 --- a/Source/Core/DebuggerWX/Src/Debugger.cpp +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (C) 2003-2008 Dolphin Project. - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, version 2.0. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License 2.0 for more details. - -// A copy of the GPL 2.0 should have been included with the program. -// If not, see http://www.gnu.org/licenses/ - -// Official SVN repository and contact information can be found at -// http://code.google.com/p/dolphin-emu/ - -#include "Debugger.h" - diff --git a/Source/Core/DebuggerWX/Src/MemoryView.cpp b/Source/Core/DebuggerWX/Src/MemoryView.cpp index 020caa29c4..338bbeef94 100644 --- a/Source/Core/DebuggerWX/Src/MemoryView.cpp +++ b/Source/Core/DebuggerWX/Src/MemoryView.cpp @@ -212,7 +212,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event) int src, dst, srcAddr; }; - branch branches[256]; + // branch branches[256]; // TODO: This is not being used int numBranches = 0; // TODO: Add any drawing code here... int width = rc.width; diff --git a/Source/Core/DebuggerWX/Src/SConscript b/Source/Core/DebuggerWX/Src/SConscript index 59ec56c32a..044509d665 100644 --- a/Source/Core/DebuggerWX/Src/SConscript +++ b/Source/Core/DebuggerWX/Src/SConscript @@ -13,7 +13,6 @@ files = ["LogWindow.cpp", "CodeWindow.cpp", "CodeWindowSJP.cpp", "CodeView.cpp", - "Debugger.cpp", "MemoryCheckDlg.cpp", "MemoryView.cpp", "MemoryWindow.cpp", diff --git a/Source/Core/DiscIO/Src/BannerLoader.cpp b/Source/Core/DiscIO/Src/BannerLoader.cpp index a45a286c4d..d14d40363f 100644 --- a/Source/Core/DiscIO/Src/BannerLoader.cpp +++ b/Source/Core/DiscIO/Src/BannerLoader.cpp @@ -101,7 +101,7 @@ bool IBannerLoader::CopySJISToString( std::string& _rDestination, const char* _s // HyperIris: because dolphin using "Use Multi-Byte Character Set", // we must convert the SJIS chars to unicode then to our windows local by hand u32 unicodeNameSize = MultiByteToWideChar(932, MB_PRECOMPOSED, - _src, strlen(_src), NULL, NULL); + _src, (int)strlen(_src), NULL, NULL); if (unicodeNameSize > 0) { u16* pUnicodeStrBuffer = new u16[unicodeNameSize + 1]; @@ -109,7 +109,7 @@ bool IBannerLoader::CopySJISToString( std::string& _rDestination, const char* _s { memset(pUnicodeStrBuffer, 0, (unicodeNameSize + 1) * sizeof(u16)); if (MultiByteToWideChar(932, MB_PRECOMPOSED, - _src, strlen(_src), + _src, (int)strlen(_src), (LPWSTR)pUnicodeStrBuffer, unicodeNameSize)) { u32 ansiNameSize = WideCharToMultiByte(CP_ACP, 0, @@ -150,7 +150,7 @@ bool IBannerLoader::CopyUnicodeToString( std::string& _rDestination, const u16* if (_src) { u32 ansiNameSize = WideCharToMultiByte(CP_ACP, 0, - (LPCWSTR)_src, wcslen((const wchar_t*)_src), + (LPCWSTR)_src, (int)wcslen((const wchar_t*)_src), NULL, NULL, NULL, NULL); if (ansiNameSize > 0) { @@ -159,7 +159,7 @@ bool IBannerLoader::CopyUnicodeToString( std::string& _rDestination, const u16* { memset(pAnsiStrBuffer, 0, (ansiNameSize + 1) * sizeof(char)); if (WideCharToMultiByte(CP_ACP, 0, - (LPCWSTR)_src, wcslen((const wchar_t*)_src), + (LPCWSTR)_src, (int)wcslen((const wchar_t*)_src), pAnsiStrBuffer, ansiNameSize, NULL, NULL)) { _rDestination = pAnsiStrBuffer; diff --git a/Source/Core/DiscIO/Src/VolumeDirectory.cpp b/Source/Core/DiscIO/Src/VolumeDirectory.cpp index e30513adeb..37fe0b8f4d 100644 --- a/Source/Core/DiscIO/Src/VolumeDirectory.cpp +++ b/Source/Core/DiscIO/Src/VolumeDirectory.cpp @@ -145,7 +145,7 @@ void CVolumeDirectory::SetUniqueID(std::string _ID) { _dbg_assert_(DVDINTERFACE, m_diskHeader); - u32 length = _ID.length(); + u32 length = (u32)_ID.length(); if(length > 6) length = 6; @@ -218,7 +218,7 @@ void CVolumeDirectory::SetName(std::string _Name) { _dbg_assert_(DVDINTERFACE, m_diskHeader); - u32 length = _Name.length(); + u32 length = (u32)_Name.length(); if(length > MAX_NAME_LENGTH) length = MAX_NAME_LENGTH; @@ -410,7 +410,7 @@ void CVolumeDirectory::WriteEntryName(u32& nameOffset, const std::string& name) { strncpy((char*)(m_FSTData + nameOffset + m_fstNameOffset), name.c_str(), name.length() + 1); - nameOffset += (name.length() + 1); + nameOffset += (u32)(name.length() + 1); } void CVolumeDirectory::WriteEntry(const File::FSTEntry& entry, u32& fstOffset, u32& nameOffset, u64& dataOffset, u32 parentEntryNum) @@ -454,7 +454,7 @@ static u32 ComputeNameSize(const File::FSTEntry& parentEntry) { nameSize += ComputeNameSize(entry); } - nameSize += entry.virtualName.length() + 1; + nameSize += (u32)entry.virtualName.length() + 1; } return nameSize; } diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index 5108c0e80c..ad86e7f9ae 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -380,7 +380,7 @@ void CGameListCtrl::ScanForISOs(bool bUpdateCache) { wxProgressDialog dialog(_T("Scanning for ISOs"), _T("Scanning..."), - rFilenames.size(), // range + (int)rFilenames.size(), // range this, // parent wxPD_APP_MODAL | // wxPD_AUTO_HIDE | -- try this as well diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index d8c2fc89f6..018d8194c0 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -679,7 +679,7 @@ void CISOProperties::PatchButtonClicked(wxCommandEvent& event) if (dlg.ShowModal() == wxID_OK) { Patches->Append(wxString::FromAscii(onFrame.back().name.c_str())); - Patches->Check(onFrame.size() - 1, onFrame.back().active); + Patches->Check((unsigned int)(onFrame.size() - 1), onFrame.back().active); } } break; diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 3c68f8438f..da74ce9e6d 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -312,7 +312,7 @@ void DolphinApp::OnEndSession() /////////////////////////////////////// Main window created #if defined HAVE_WX && HAVE_WX -bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int Style) +bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*/) { return wxYES == wxMessageBox(wxString::FromAscii(text), wxString::FromAscii(caption), diff --git a/Source/Core/VideoCommon/Src/Fifo.cpp b/Source/Core/VideoCommon/Src/Fifo.cpp index 8ebe2dc720..b848aa1f41 100644 --- a/Source/Core/VideoCommon/Src/Fifo.cpp +++ b/Source/Core/VideoCommon/Src/Fifo.cpp @@ -157,7 +157,7 @@ void Fifo_EnterLoop(const SVideoInitialize &video_initialize) } Video_SendFifoData(uData, distToSend); Common::SyncInterlockedExchange((LONG*)&_fifo.CPReadPointer, readPtr); - Common::SyncInterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -distToSend); + Common::SyncInterlockedExchangeAdd((LONG*)&_fifo.CPReadWriteDistance, -(__int64)distToSend); } //video_initialize.pLog("..........................IDLE",FALSE); Common::SyncInterlockedExchange((LONG*)&_fifo.CPReadIdle, 1); |
