add voids whenever not using return values

This commit is contained in:
RadWolfie 2020-06-13 16:41:48 -05:00
parent 5bc4eee10b
commit 9f593237fe
5 changed files with 11 additions and 11 deletions

View File

@ -186,7 +186,7 @@ MsgDlgRet CxbxPopupMessageEx(void* hwnd, CXBXR_MODULE cxbxr_module, LOG_LEVEL le
bTestCaseLogged = true; \
if (!g_CurrentLogPopupTestcase) break;\
LOG_CHECK_ENABLED(LOG_LEVEL::INFO) { \
CxbxPopupMsgInfoSimple(nullptr, "Please report that %s shows the following message:\nLOG_TEST_CASE: %s\nIn %s (%s line %d)", \
(void)CxbxPopupMsgInfoSimple(nullptr, "Please report that %s shows the following message:\nLOG_TEST_CASE: %s\nIn %s (%s line %d)", \
CxbxKrnl_Xbe->m_szAsciiTitle, message, __func__, __FILE__, __LINE__); } } while (0)
// was g_pCertificate->wszTitleName

View File

@ -613,7 +613,7 @@ XBSYSAPI EXPORTNUM(49) xboxkrnl::VOID DECLSPEC_NORETURN NTAPI xboxkrnl::HalRetur
retryAttempt++;
// Terminate after 5 seconds of failure.
if (retryAttempt >= (5 * (1000 / 100))) {
CxbxPopupMsgErrorSimple(nullptr, "Could not reboot, new emulation process did not take over.");
(void)CxbxPopupMsgErrorSimple(nullptr, "Could not reboot, new emulation process did not take over.");
break;
}
}

View File

@ -622,7 +622,7 @@ bool CreateSettings()
{
g_Settings = new Settings();
if (g_Settings == nullptr) {
CxbxPopupMsgErrorSimple(nullptr, szSettings_alloc_error);
(void)CxbxPopupMsgErrorSimple(nullptr, szSettings_alloc_error);
return false;
}
@ -1607,7 +1607,7 @@ bool CxbxLockFilePath()
}
if (GetLastError() == ERROR_ALREADY_EXISTS) {
CxbxPopupMsgErrorSimple(nullptr, "Data path directory is currently in used.\nUse different data path directory or stop emulation from another process.");
(void)CxbxPopupMsgErrorSimple(nullptr, "Data path directory is currently in used.\nUse different data path directory or stop emulation from another process.");
CloseHandle(hMapDataHash);
return false;
}

View File

@ -147,7 +147,7 @@ INT_PTR CALLBACK DlgLogConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM
}
if (LogPopupTestcase) {
SendMessage(GetDlgItem(hWndDlg, IDC_LOG_POPUP_TESTCASE), BM_SETCHECK, BST_CHECKED, 0);
(void)SendMessage(GetDlgItem(hWndDlg, IDC_LOG_POPUP_TESTCASE), BM_SETCHECK, BST_CHECKED, 0);
}
counter = 0;

View File

@ -54,26 +54,26 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
// First detect if we are running on WoW64, if not, prevent Cxbx-Reloaded from starting
// Cxbx-Reloaded needs access to high memory, only exposed to WoW64.
if (!VerifyWow64()) {
CxbxPopupMsgErrorSimple(nullptr, "Cxbx-Reloaded can only run under WoW64\nThis means either a 64-bit version of Windows or Wine with a 64-bit prefix");
(void)CxbxPopupMsgErrorSimple(nullptr, "Cxbx-Reloaded can only run under WoW64\nThis means either a 64-bit version of Windows or Wine with a 64-bit prefix");
return EXIT_FAILURE;
}
#ifndef CXBXR_EMU
/*! verify Cxbx.exe is loaded to base address 0x00010000 */
if (!VerifyBaseAddr()) {
CxbxPopupMsgErrorSimple(nullptr, "Cxbx.exe is not loaded to base address 0x00010000 (which is a requirement for Xbox emulation)");
(void)CxbxPopupMsgErrorSimple(nullptr, "Cxbx.exe is not loaded to base address 0x00010000 (which is a requirement for Xbox emulation)");
return EXIT_FAILURE;
}
#endif
if (!cli_config::GenConfig(__argv, __argc)) {
CxbxPopupMsgErrorSimple(nullptr, "Couldn't convert parsed command line!");
(void)CxbxPopupMsgErrorSimple(nullptr, "Couldn't convert parsed command line!");
return EXIT_FAILURE;
}
/*! initialize shared memory */
if (!EmuShared::Init(cli_config::GetSessionID())) {
CxbxPopupMsgErrorSimple(nullptr, "Could not map shared memory!");
(void)CxbxPopupMsgErrorSimple(nullptr, "Could not map shared memory!");
return EXIT_FAILURE;
}
@ -88,7 +88,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
EmuShared::Cleanup();
return EXIT_SUCCESS;
#else
CxbxPopupMsgErrorSimple(nullptr, "Emulation must be launched from cxbxr-ldr.exe!");
(void)CxbxPopupMsgErrorSimple(nullptr, "Emulation must be launched from cxbxr-ldr.exe!");
EmuShared::Cleanup();
return EXIT_FAILURE;
#endif
@ -139,7 +139,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
/*! if an error occurred, notify user */
if(MainWindow->HasError()) {
CxbxPopupMsgErrorSimple(nullptr, MainWindow->GetError().c_str());
(void)CxbxPopupMsgErrorSimple(nullptr, MainWindow->GetError().c_str());
}
delete MainWindow;