Ran Cppcheck on SPU2-X, fixed a few things it found.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4179 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2011-01-06 12:25:01 +00:00
parent ff33680e5c
commit cfb47e2e19
6 changed files with 5 additions and 18 deletions

View File

@ -371,7 +371,7 @@ extern HWND hDebugDialog;
static BOOL CALLBACK DebugProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) static BOOL CALLBACK DebugProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{ {
int wmId,wmEvent; int wmId;
switch(uMsg) switch(uMsg)
{ {
@ -385,7 +385,6 @@ static BOOL CALLBACK DebugProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
case WM_COMMAND: case WM_COMMAND:
wmId = LOWORD(wParam); wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections: // Parse the menu selections:
switch (wmId) switch (wmId)
{ {

View File

@ -177,7 +177,7 @@ void EnableControls( HWND hWnd )
static BOOL CALLBACK DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) static BOOL CALLBACK DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{ {
int wmId,wmEvent; int wmId;
//wchar_t temp[384]={0}; //wchar_t temp[384]={0};
switch(uMsg) switch(uMsg)
@ -211,7 +211,6 @@ static BOOL CALLBACK DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
case WM_COMMAND: case WM_COMMAND:
wmId = LOWORD(wParam); wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections: // Parse the menu selections:
switch (wmId) switch (wmId)
{ {

View File

@ -66,7 +66,7 @@ void SoundtouchCfg::WriteSettings()
BOOL CALLBACK SoundtouchCfg::DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) BOOL CALLBACK SoundtouchCfg::DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{ {
int wmId,wmEvent; int wmId;
//wchar_t temp[384]={0}; //wchar_t temp[384]={0};
switch(uMsg) switch(uMsg)
@ -87,7 +87,6 @@ BOOL CALLBACK SoundtouchCfg::DialogProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM
case WM_COMMAND: case WM_COMMAND:
wmId = LOWORD(wParam); wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections: // Parse the menu selections:
if( wmId == IDOK ) if( wmId == IDOK )
{ {

View File

@ -205,7 +205,6 @@ private:
static BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) static BOOL CALLBACK ConfigProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{ {
int wmId,wmEvent; int wmId,wmEvent;
int tSel=0;
switch(uMsg) switch(uMsg)
{ {

View File

@ -29,7 +29,7 @@ HRESULT GUIDFromString(const char *str, LPGUID guid)
struct T{ // this is a hack because for some reason sscanf writes too much :/ struct T{ // this is a hack because for some reason sscanf writes too much :/
GUID g; GUID g;
int k; int k; // << not used but still needed as of January 6th, 2011
} t; } t;
int r = sscanf_s(str,"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", int r = sscanf_s(str,"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
@ -83,7 +83,7 @@ BOOL DoHandleScrollMessage( HWND hwndDisplay, WPARAM wParam, LPARAM lParam )
{ {
int wmId = LOWORD(wParam); int wmId = LOWORD(wParam);
int wmEvent = HIWORD(wParam); int wmEvent = HIWORD(wParam);
static char temp[64];
switch(wmId) switch(wmId)
{ {
//case TB_ENDTRACK: //case TB_ENDTRACK:

View File

@ -449,18 +449,9 @@ __forceinline void TimeUpdate(u32 cClocks)
} }
} }
static u16 mask = 0xFFFF;
__forceinline void UpdateSpdifMode() __forceinline void UpdateSpdifMode()
{ {
int OPM=PlayMode; int OPM=PlayMode;
u16 last = 0;
if(mask&Spdif.Out)
{
last = mask & Spdif.Out;
mask=mask&(~Spdif.Out);
}
if(Spdif.Out&0x4) // use 24/32bit PCM data streaming if(Spdif.Out&0x4) // use 24/32bit PCM data streaming
{ {