summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2013-08-29 01:33:24 -0400
committercomex <comexk@gmail.com>2013-09-01 22:58:33 -0400
commitfd7cf5bb719d0fb04814d9df4a6a783d648dad40 (patch)
tree104236949ea2a9030ae58e32db60e24664dcbf9c /Source/Core
parentd41eb76378eb8d96fe7e447ad4229badbdb3b719 (diff)
A bunch of trivial changes to fix clang warnings.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/AudioCommon/Src/DPL2Decoder.cpp4
-rw-r--r--Source/Core/AudioCommon/Src/Mixer.cpp2
-rw-r--r--Source/Core/Common/Src/SettingsHandler.cpp2
-rw-r--r--Source/Core/Common/Src/Timer.cpp4
-rw-r--r--Source/Core/Common/Src/Timer.h1
-rw-r--r--Source/Core/Core/Src/Boot/ElfReader.h1
-rw-r--r--Source/Core/Core/Src/Debugger/Dump.cpp3
-rw-r--r--Source/Core/Core/Src/Debugger/Dump.h1
-rw-r--r--Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h2
-rw-r--r--Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.h1
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp3
-rw-r--r--Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h2
-rw-r--r--Source/Core/Core/Src/Movie.cpp2
-rw-r--r--Source/Core/DiscIO/Src/DriveBlob.h1
-rw-r--r--Source/Core/DiscIO/Src/VolumeWad.h1
-rw-r--r--Source/Core/DolphinWX/Src/Debugger/CodeView.cpp3
-rw-r--r--Source/Core/DolphinWX/Src/Debugger/CodeView.h3
-rw-r--r--Source/Core/DolphinWX/Src/Frame.cpp2
-rw-r--r--Source/Core/DolphinWX/Src/GLInterface/AGL.cpp6
-rw-r--r--Source/Core/DolphinWX/Src/ISOFile.h1
-rw-r--r--Source/Core/DolphinWX/Src/TASInputDlg.cpp2
-rw-r--r--Source/Core/DolphinWX/Src/TASInputDlg.h2
-rw-r--r--Source/Core/DolphinWX/Src/WiimoteConfigDiag.h1
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h5
-rw-r--r--Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm1
25 files changed, 20 insertions, 36 deletions
diff --git a/Source/Core/AudioCommon/Src/DPL2Decoder.cpp b/Source/Core/AudioCommon/Src/DPL2Decoder.cpp
index 5b41c605ce..97bdb5413d 100644
--- a/Source/Core/AudioCommon/Src/DPL2Decoder.cpp
+++ b/Source/Core/AudioCommon/Src/DPL2Decoder.cpp
@@ -14,8 +14,12 @@
#include <string.h>
#include "DPL2Decoder.h"
+#ifndef M_PI
#define M_PI 3.14159265358979323846
+#endif
+#ifndef M_SQRT1_2
#define M_SQRT1_2 0.70710678118654752440
+#endif
int olddelay = -1;
unsigned int oldfreq = 0;
diff --git a/Source/Core/AudioCommon/Src/Mixer.cpp b/Source/Core/AudioCommon/Src/Mixer.cpp
index 2c526cf3bd..fb29f4902f 100644
--- a/Source/Core/AudioCommon/Src/Mixer.cpp
+++ b/Source/Core/AudioCommon/Src/Mixer.cpp
@@ -210,7 +210,7 @@ unsigned int CMixer::GetNumSamples()
u32 numSamples = ((Common::AtomicLoad(m_indexW) - Common::AtomicLoad(m_indexR)) & INDEX_MASK) / 2;
if (AudioInterface::GetAIDSampleRate() == m_sampleRate)
- numSamples = numSamples; // 1:1
+ ; //numSamples = numSamples; // 1:1
else if (m_sampleRate == 48000 && AudioInterface::GetAIDSampleRate() == 32000)
numSamples = numSamples * 3 / 2 - 2; // most common case
else
diff --git a/Source/Core/Common/Src/SettingsHandler.cpp b/Source/Core/Common/Src/SettingsHandler.cpp
index 46b4170fcb..3bd9b27c2f 100644
--- a/Source/Core/Common/Src/SettingsHandler.cpp
+++ b/Source/Core/Common/Src/SettingsHandler.cpp
@@ -45,7 +45,7 @@ const std::string SettingsHandler::GetValue(const std::string key)
else
{
toFind = key + "=";
- size_t found = decoded.find(toFind);
+ found = decoded.find(toFind);
if (found == 0)
{
size_t delimFound = decoded.find(delim, found + toFind.length());
diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp
index 926de59917..945d2fac76 100644
--- a/Source/Core/Common/Src/Timer.cpp
+++ b/Source/Core/Common/Src/Timer.cpp
@@ -39,10 +39,6 @@ Timer::Timer()
: m_LastTime(0), m_StartTime(0), m_Running(false)
{
Update();
-
-#ifdef _WIN32
- QueryPerformanceFrequency((LARGE_INTEGER*)&m_frequency);
-#endif
}
// Write the starting time
diff --git a/Source/Core/Common/Src/Timer.h b/Source/Core/Common/Src/Timer.h
index d230c73608..920a001282 100644
--- a/Source/Core/Common/Src/Timer.h
+++ b/Source/Core/Common/Src/Timer.h
@@ -38,7 +38,6 @@ public:
private:
u64 m_LastTime;
u64 m_StartTime;
- u64 m_frequency;
bool m_Running;
};
diff --git a/Source/Core/Core/Src/Boot/ElfReader.h b/Source/Core/Core/Src/Boot/ElfReader.h
index de071572a6..47a4ef7103 100644
--- a/Source/Core/Core/Src/Boot/ElfReader.h
+++ b/Source/Core/Core/Src/Boot/ElfReader.h
@@ -27,7 +27,6 @@ private:
Elf32_Phdr *segments;
Elf32_Shdr *sections;
- u32 *sectionOffsets;
u32 *sectionAddrs;
bool bRelocate;
u32 entryPoint;
diff --git a/Source/Core/Core/Src/Debugger/Dump.cpp b/Source/Core/Core/Src/Debugger/Dump.cpp
index 8d784cf8b0..8a9a87c2b8 100644
--- a/Source/Core/Core/Src/Debugger/Dump.cpp
+++ b/Source/Core/Core/Src/Debugger/Dump.cpp
@@ -9,8 +9,7 @@
#include "FileUtil.h"
CDump::CDump(const char* _szFilename) :
- m_pData(NULL),
- m_bInit(false)
+ m_pData(NULL)
{
File::IOFile pStream(_szFilename, "rb");
if (pStream)
diff --git a/Source/Core/Core/Src/Debugger/Dump.h b/Source/Core/Core/Src/Debugger/Dump.h
index ae94b6571e..d2764714c0 100644
--- a/Source/Core/Core/Src/Debugger/Dump.h
+++ b/Source/Core/Core/Src/Debugger/Dump.h
@@ -32,7 +32,6 @@ private:
u8 *m_pData;
- bool m_bInit;
size_t m_size;
u32 Read32(u32 _pos);
diff --git a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
index ed65a89fe5..6819b05818 100644
--- a/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
+++ b/Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_AX_Voice.h
@@ -103,6 +103,7 @@ bool WritePB(u32 addr, const PB_TYPE& pb)
return true;
}
+#if 0
// Dump the value of a PB for debugging
#define DUMP_U16(field) WARN_LOG(DSPHLE, " %04x (%s)", pb.field, #field)
#define DUMP_U32(field) WARN_LOG(DSPHLE, " %08x (%s)", HILO_TO_32(pb.field), #field)
@@ -122,6 +123,7 @@ void DumpPB(const PB_TYPE& pb)
// TODO: complete as needed
}
+#endif
// Simulated accelerator state.
static u32 acc_loop_addr, acc_end_addr;
diff --git a/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.h b/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.h
index 0960c272a8..b2c73e1920 100644
--- a/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.h
+++ b/Source/Core/Core/Src/HW/WiimoteEmu/Attachment/Turntable.h
@@ -31,7 +31,6 @@ public:
private:
Buttons* m_buttons;
- MixedTriggers* m_triggers;
AnalogStick* m_stick;
Triggers *m_effect_dial;
Slider *m_left_table, *m_right_table, *m_crossfade;
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
index df762a8358..f9e40110fb 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.cpp
@@ -472,7 +472,8 @@ bool CWII_IPC_HLE_Device_net_wd_command::IOCtlV(u32 CommandAddress)
case IOCTLV_WD_SCAN:
{
// Gives parameters detailing type of scan and what to match
- ScanInfo *scan = (ScanInfo *)Memory::GetPointer(CommandBuffer.InBuffer.at(0).m_Address);
+ // XXX - unused
+ // ScanInfo *scan = (ScanInfo *)Memory::GetPointer(CommandBuffer.InBuffer.at(0).m_Address);
u16 *results = (u16 *)Memory::GetPointer(CommandBuffer.PayloadBuffer.at(0).m_Address);
// first u16 indicates number of BSSInfo following
diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h
index 3f3c50926b..36402a593a 100644
--- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h
+++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h
@@ -475,9 +475,7 @@ public:
{
u32 Parameter = Memory::Read_U32(_CommandAddress + 0x0C);
u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10);
- u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14);
u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18);
- u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C);
u32 result = 0;
u32 common_result = 0;
diff --git a/Source/Core/Core/Src/Movie.cpp b/Source/Core/Core/Src/Movie.cpp
index 0be4bb8926..d22f625fce 100644
--- a/Source/Core/Core/Src/Movie.cpp
+++ b/Source/Core/Core/Src/Movie.cpp
@@ -1174,7 +1174,7 @@ void GetSettings()
u8 tmp[21];
for (int i = 0; i < 20; ++i)
{
- sscanf(SCM_REV_STR + 2 * i, "%02hhx", &tmp[i]);
+ sscanf(&SCM_REV_STR[2 * i], "%02hhx", &tmp[i]);
revision[i] = tmp[i];
}
}
diff --git a/Source/Core/DiscIO/Src/DriveBlob.h b/Source/Core/DiscIO/Src/DriveBlob.h
index cb1c7f8f08..d5c13a3b15 100644
--- a/Source/Core/DiscIO/Src/DriveBlob.h
+++ b/Source/Core/DiscIO/Src/DriveBlob.h
@@ -31,7 +31,6 @@ private:
bool IsOK() {return file_ != 0;}
#endif
s64 size;
- u64 *block_pointers;
public:
static DriveReader *Create(const char *drive);
diff --git a/Source/Core/DiscIO/Src/VolumeWad.h b/Source/Core/DiscIO/Src/VolumeWad.h
index d22e7a2c9e..59edf79cd4 100644
--- a/Source/Core/DiscIO/Src/VolumeWad.h
+++ b/Source/Core/DiscIO/Src/VolumeWad.h
@@ -34,7 +34,6 @@ public:
private:
IBlobReader* m_pReader;
- u64 m_titleID;
u32 OpeningBnrOffset, hdr_size, cert_size, tick_size, tmd_size, data_size;
u8 m_Country;
};
diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Src/Debugger/CodeView.cpp
index 4080d2b564..bcfb1ab586 100644
--- a/Source/Core/DolphinWX/Src/Debugger/CodeView.cpp
+++ b/Source/Core/DolphinWX/Src/Debugger/CodeView.cpp
@@ -57,10 +57,7 @@ CCodeView::CCodeView(DebugInterface* debuginterface, SymbolDB *symboldb,
rowHeight(13),
selection(0),
oldSelection(0),
- selectionChanged(false),
selecting(false),
- hasFocus(false),
- showHex(false),
lx(-1),
ly(-1)
{
diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeView.h b/Source/Core/DolphinWX/Src/Debugger/CodeView.h
index 5f4c41eaf7..5618abf4d7 100644
--- a/Source/Core/DolphinWX/Src/Debugger/CodeView.h
+++ b/Source/Core/DolphinWX/Src/Debugger/CodeView.h
@@ -73,10 +73,7 @@ private:
u32 selection;
u32 oldSelection;
- bool selectionChanged;
bool selecting;
- bool hasFocus;
- bool showHex;
int lx, ly;
void _MoveTo(int x, int y) {lx = x; ly = y;}
diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp
index dab18a1687..9c76cd5420 100644
--- a/Source/Core/DolphinWX/Src/Frame.cpp
+++ b/Source/Core/DolphinWX/Src/Frame.cpp
@@ -811,7 +811,7 @@ bool TASInputHasFocus()
{
for (int i = 0; i < 4; i++)
{
- if (main_frame->g_TASInputDlg[i]->HasFocus())
+ if (main_frame->g_TASInputDlg[i]->TASHasFocus())
return true;
}
return false;
diff --git a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
index 67f27a0ddb..2062268e05 100644
--- a/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
+++ b/Source/Core/DolphinWX/Src/GLInterface/AGL.cpp
@@ -58,7 +58,7 @@ bool cInterfaceAGL::Create(void *&window_handle)
initWithAttributes: attr];
if (fmt == nil) {
ERROR_LOG(VIDEO, "failed to create pixel format");
- return NULL;
+ return false;
}
GLWin.cocoaCtx = [[NSOpenGLContext alloc]
@@ -66,12 +66,12 @@ bool cInterfaceAGL::Create(void *&window_handle)
[fmt release];
if (GLWin.cocoaCtx == nil) {
ERROR_LOG(VIDEO, "failed to create context");
- return NULL;
+ return false;
}
if (GLWin.cocoaWin == nil) {
ERROR_LOG(VIDEO, "failed to create window");
- return NULL;
+ return false;
}
[window makeFirstResponder:GLWin.cocoaWin];
diff --git a/Source/Core/DolphinWX/Src/ISOFile.h b/Source/Core/DolphinWX/Src/ISOFile.h
index 9c4fe15299..080f45fd32 100644
--- a/Source/Core/DolphinWX/Src/ISOFile.h
+++ b/Source/Core/DolphinWX/Src/ISOFile.h
@@ -83,7 +83,6 @@ private:
bool m_Valid;
bool m_BlobCompressed;
std::vector<u8> m_pImage;
- u32 m_ImageSize;
bool m_IsDiscTwo;
bool LoadFromCache();
diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.cpp b/Source/Core/DolphinWX/Src/TASInputDlg.cpp
index 8845eda961..e3db56e7fb 100644
--- a/Source/Core/DolphinWX/Src/TASInputDlg.cpp
+++ b/Source/Core/DolphinWX/Src/TASInputDlg.cpp
@@ -697,7 +697,7 @@ void TASInputDlg::OnCloseWindow(wxCloseEvent& event)
}
}
-bool TASInputDlg::HasFocus()
+bool TASInputDlg::TASHasFocus()
{
//allows numbers to be used as hotkeys
if(TextBoxHasFocus())
diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.h b/Source/Core/DolphinWX/Src/TASInputDlg.h
index 46f2d50405..70f2db92a1 100644
--- a/Source/Core/DolphinWX/Src/TASInputDlg.h
+++ b/Source/Core/DolphinWX/Src/TASInputDlg.h
@@ -34,7 +34,7 @@ class TASInputDlg : public wxDialog
void GetKeyBoardInput(SPADStatus *PadStatus);
bool TextBoxHasFocus();
void SetLandRTriggers();
- bool HasFocus();
+ bool TASHasFocus();
wxBitmap CreateStickBitmap(int x, int y);
diff --git a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h
index c6368fc33b..977760f579 100644
--- a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h
+++ b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.h
@@ -68,7 +68,6 @@ private:
void Cancel(wxCommandEvent& event);
InputPlugin& m_plugin;
- wxNotebook* m_pad_notebook;
std::map<wxWindowID, unsigned int> m_wiimote_index_from_ctrl_id;
unsigned int m_orig_wiimote_sources[MAX_BBMOTES];
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h
index 930f849a17..e5c2c1b3d4 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h
+++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.h
@@ -26,7 +26,7 @@ private:
public:
std::string GetName() const;
bool IsDetectable() { return false; }
- Cursor(u8 index, const float& axis, const bool positive) : m_index(index), m_axis(axis), m_positive(positive) {}
+ Cursor(u8 index, const float& axis, const bool positive) : m_axis(axis), m_index(index), m_positive(positive) {}
ControlState GetState() const;
private:
const float& m_axis;
@@ -37,7 +37,7 @@ private:
{
public:
std::string GetName() const;
- Button(u8 index, const unsigned char& button) : m_index(index), m_button(button) {}
+ Button(u8 index, const unsigned char& button) : m_button(button), m_index(index) {}
ControlState GetState() const;
private:
const unsigned char& m_button;
@@ -63,7 +63,6 @@ private:
const IOHIDDeviceRef m_device;
const std::string m_device_name;
int m_index;
- void *m_window;
uint32_t m_windowid;
unsigned char m_mousebuttons[3];
};
diff --git a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm
index 003240d4a9..6473f00e77 100644
--- a/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm
+++ b/Source/Core/InputCommon/Src/ControllerInterface/OSX/OSXKeyboard.mm
@@ -16,7 +16,6 @@ Keyboard::Keyboard(IOHIDDeviceRef device, std::string name, int index, void *win
: m_device(device)
, m_device_name(name)
, m_index(index)
- , m_window(window)
{
// This class should only recieve Keyboard or Keypad devices
// Now, filter on just the buttons we can handle sanely