summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-03-05 22:35:06 +0000
committerhrydgard <hrydgard@gmail.com>2009-03-05 22:35:06 +0000
commit02a4b49df196471bd56cd73b46891074cbdfdc34 (patch)
tree737f0be4114aa2c6f2ecf7ade9fe28b10b950586 /Source/Core
parent3f840806b3c3504d826d29ce7c7c1d336c02adc7 (diff)
just some compiler warning cleanup.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2562 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/ChunkFile.h8
-rw-r--r--Source/Core/Common/Src/Log.h8
-rw-r--r--Source/Core/Core/Src/HW/SystemTimers.cpp3
-rw-r--r--Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp2
-rw-r--r--Source/Core/DiscIO/Src/NANDContentLoader.cpp1
-rw-r--r--Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp9
-rw-r--r--Source/Core/InputCommon/Src/EventHandler.cpp4
-rw-r--r--Source/Core/VideoCommon/Src/VideoCommon.h8
8 files changed, 24 insertions, 19 deletions
diff --git a/Source/Core/Common/Src/ChunkFile.h b/Source/Core/Common/Src/ChunkFile.h
index bcdfe2746f..b9145f04c1 100644
--- a/Source/Core/Common/Src/ChunkFile.h
+++ b/Source/Core/Common/Src/ChunkFile.h
@@ -157,8 +157,8 @@ public:
return false;
}
- FILE* pFile;
- if (! (pFile = fopen(_rFilename.c_str(), "rb"))) {
+ FILE* pFile = fopen(_rFilename.c_str(), "rb");
+ if (!pFile) {
ERROR_LOG(COMMON,"ChunkReader: Can't open file for reading");
return false;
}
@@ -219,8 +219,8 @@ public:
FILE* pFile;
INFO_LOG(COMMON, "ChunkReader: Writing %s" , _rFilename.c_str());
-
- if (! (pFile = fopen(_rFilename.c_str(), "wb"))) {
+ pFile = fopen(_rFilename.c_str(), "wb");
+ if (!pFile) {
ERROR_LOG(COMMON,"ChunkReader: Error opening file for write");
return false;
}
diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h
index 83a022d7e7..b4790a5ba3 100644
--- a/Source/Core/Common/Src/Log.h
+++ b/Source/Core/Common/Src/Log.h
@@ -83,10 +83,10 @@ enum LOG_LEVELS {
#endif // loglevel
#endif // logging
-#define ERROR_LOG(...)
-#define WARN_LOG(...)
-#define INFO_LOG(...)
-#define DEBUG_LOG(...)
+#define ERROR_LOG(...) {}
+#define WARN_LOG(...) {}
+#define INFO_LOG(...) {}
+#define DEBUG_LOG(...) {}
extern void __Log(int logNumber, const char* text, ...);
diff --git a/Source/Core/Core/Src/HW/SystemTimers.cpp b/Source/Core/Core/Src/HW/SystemTimers.cpp
index 521d8e001e..6edeff0ac8 100644
--- a/Source/Core/Core/Src/HW/SystemTimers.cpp
+++ b/Source/Core/Core/Src/HW/SystemTimers.cpp
@@ -76,8 +76,9 @@
#include "../IPC_HLE/WII_IPC_HLE.h"
#include "Thread.h"
#include "Timer.h"
-/////////////////////////////
+#include "../SmartFrameLimiter.h"
+/////////////////////////////
namespace SystemTimers
{
diff --git a/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp b/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp
index 0beaa10a25..0093a6159c 100644
--- a/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp
+++ b/Source/Core/DebuggerWX/Src/CodeWindowSJP.cpp
@@ -206,7 +206,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
bool started = false;
while (!feof(f))
{
- char line[512], temp[256];
+ char line[512];
fgets(line, 511, f);
if (strlen(line) < 4)
continue;
diff --git a/Source/Core/DiscIO/Src/NANDContentLoader.cpp b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
index ff56b2c6ae..668d28488f 100644
--- a/Source/Core/DiscIO/Src/NANDContentLoader.cpp
+++ b/Source/Core/DiscIO/Src/NANDContentLoader.cpp
@@ -144,7 +144,6 @@ bool CNANDContentLoader::CreateFromDirectory(const std::string& _rPath)
} else {
ERROR_LOG(DISCIO, "CreateFromDirectory: error opening %s",
szFilename);
-
}
}
diff --git a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp
index 26fd82082a..eb3316549c 100644
--- a/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp
+++ b/Source/Core/DolphinWX/Src/MemoryCards/GCMemcard.cpp
@@ -1158,7 +1158,7 @@ bool GCMemcard::format(bool New)
bool GCMemcard::formatWIP(int slot, bool New, bool sjis)
{
u32 data_size = 0x2000 * (0x80 * 0x10 - 5);
- u16 size = u16((((data_size / 0x2000) + 5) / 0x10));
+ u16 size = (u16)(((data_size / 0x2000) + 5) / 0x10);
SRAM m_SRAM;
FILE * pStream;
u64 time, rand;
@@ -1183,15 +1183,14 @@ bool GCMemcard::formatWIP(int slot, bool New, bool sjis)
for(int i = 0; i < 12; i++)
{
-
- rand = (((rand*(u64)0x0000000041c64e6d)+(u64)0x0000000000003039)>>16);
+ rand = (((rand*(u64)0x0000000041c64e6dULL)+(u64)0x0000000000003039ULL)>>16);
// PanicAlert("%16x",rand);
// PanicAlert("m_SRAM.syssramex.flash_id %16x",(flash_id[i]));
// PanicAlert("%16x",(flash_id[i]+(u32)rand));
// PanicAlert("%16x",(flash_id+Common::swap32((u32)rand)));
hdr.serial[i] = u8((flash_id[i]+(u32)rand));
- rand = (((rand*(u64)0x0000000041c64e6d)+(u64)0x0000000000003039)>>16);
- rand &= (u64)0x0000000000007fff;
+ rand = (((rand*(u64)0x0000000041c64e6dULL)+(u64)0x0000000000003039ULL)>>16);
+ rand &= (u64)0x0000000000007fffULL;
}
hdr.fmtTime.high = (time >> 32) & 0xFFFFFFFF;
hdr.fmtTime.low = time & 0xFFFFFFFF;
diff --git a/Source/Core/InputCommon/Src/EventHandler.cpp b/Source/Core/InputCommon/Src/EventHandler.cpp
index 1d4e42ea17..7a0cde5f9c 100644
--- a/Source/Core/InputCommon/Src/EventHandler.cpp
+++ b/Source/Core/InputCommon/Src/EventHandler.cpp
@@ -8,8 +8,8 @@ EventHandler *EventHandler::m_Instance = 0;
EventHandler::EventHandler() {
for (int i=0; i<NUMKEYS; i++)
- for (int j=0; j<NUMMODS; j++)
- keys[i][j] = NULL;
+ for (int j=0; j<NUMMODS; j++)
+ keys[i][j] = NULL;
// memset(keys, sizeof(listenFuncPtr) * NUMKEYS*NUMMODS, 0);
memset(mouse, sizeof(listenFuncPtr) * (sf::Mouse::Count+1), 0);
memset(joys, sizeof(listenFuncPtr) * (sf::Joy::Count+1), 0);
diff --git a/Source/Core/VideoCommon/Src/VideoCommon.h b/Source/Core/VideoCommon/Src/VideoCommon.h
index 8082da16b5..16344e4a9a 100644
--- a/Source/Core/VideoCommon/Src/VideoCommon.h
+++ b/Source/Core/VideoCommon/Src/VideoCommon.h
@@ -97,7 +97,13 @@ inline float Memory_Read_Float(u32 _uAddress)
struct TRectangle
{
- int left, top, right, bottom;
+ int left;
+ int top;
+ int right;
+ int bottom;
+
+ int GetWidth() const { return right - left; }
+ int GetHeight() const { return bottom - top; }
};
// Logging