Merge pull request #1586 from shygoo/debugger-cleanup

[Debugger] Clean up compiler warnings
This commit is contained in:
zilmar 2019-01-28 17:53:24 +10:30 committed by GitHub
commit eef2ed27aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 13 deletions

View File

@ -180,7 +180,7 @@ void CCPULog::DumpToFile(const char* path)
szCmdArgs = "";
}
fprintf(fp, "%08X: %08X %s %s\n", state->pc, state->opcode, szCmdName, szCmdArgs);
fprintf(fp, "%08X: %08X %s %s\n", state->pc, state->opcode.Hex, szCmdName, szCmdArgs);
}
fclose(fp);

View File

@ -183,7 +183,7 @@ LRESULT CDebugCPULogView::OnScroll(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam,
{
WORD type = LOWORD(wParam);
HWND hScrollbar = (HWND)lParam;
WORD scrlId = ::GetDlgCtrlID(hScrollbar);
WORD scrlId = (WORD)::GetDlgCtrlID(hScrollbar);
SCROLLINFO scrollInfo;
scrollInfo.cbSize = sizeof(SCROLLINFO);
@ -212,7 +212,7 @@ LRESULT CDebugCPULogView::OnScroll(UINT /*uMsg*/, WPARAM wParam, LPARAM lParam,
return 0;
}
void CDebugCPULogView::InterceptMouseWheel(WPARAM wParam, LPARAM lParam)
void CDebugCPULogView::InterceptMouseWheel(WPARAM wParam, LPARAM /*lParam*/)
{
int nScroll = -((short)HIWORD(wParam) / WHEEL_DELTA);
@ -248,7 +248,7 @@ void CDebugCPULogView::OnExitSizeMove(void)
void CDebugCPULogView::ToggleLoggingEnabled(void)
{
bool bEnableLogging = m_EnabledChk.GetCheck();
bool bEnableLogging = (m_EnabledChk.GetCheck() == BST_CHECKED);
m_BuffSizeEdit.EnableWindow(!bEnableLogging);
@ -390,7 +390,6 @@ void CDebugCPULogView::Export(void)
OPENFILENAME openfilename;
char filePath[255];
char drive[_MAX_DRIVE], dir[_MAX_DIR], fname[_MAX_FNAME], ext[_MAX_EXT];
memset(&filePath, 0, sizeof(filePath));
memset(&openfilename, 0, sizeof(openfilename));

View File

@ -1453,7 +1453,7 @@ LRESULT CDebugCommandsView::OnListBoxClicked(WORD /*wNotifyCode*/, WORD wID, HWN
return FALSE;
}
LRESULT CDebugCommandsView::OnActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
LRESULT CDebugCommandsView::OnActivate(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
if (!m_Attached)
{

View File

@ -80,16 +80,16 @@ LRESULT CDebugStackView::OnClicked(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCt
void CDebugStackView::Refresh()
{
if (g_Reg == NULL)
{
return;
}
m_StackList.SetRedraw(FALSE);
m_StackList.DeleteAllItems();
uint32_t spBase;
if (g_Reg != NULL)
{
spBase = g_Reg->m_GPR[29].UW[0];
m_SPStatic.SetWindowTextA(stdstr_f("SP: %08X", spBase).c_str());
}
uint32_t spBase = g_Reg->m_GPR[29].UW[0];
m_SPStatic.SetWindowTextA(stdstr_f("SP: %08X", spBase).c_str());
CSymbols::EnterCriticalSection();