diff options
| author | 2022-10-21 02:34:08 -0400 | |
|---|---|---|
| committer | 2022-10-22 15:02:04 -0400 | |
| commit | f86774c1aca0e431248cf320e65e7785ad22cf3c (patch) | |
| tree | f8759633e40f44532623b53a0c201bb48ab025d1 | |
| parent | general: Resolve -Wunused-but-set-variable (diff) | |
| download | yuzu-f86774c1aca0e431248cf320e65e7785ad22cf3c.tar.gz yuzu-f86774c1aca0e431248cf320e65e7785ad22cf3c.tar.xz yuzu-f86774c1aca0e431248cf320e65e7785ad22cf3c.zip | |
startup_checks: Resolve -Wformat
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/startup_checks.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/yuzu/startup_checks.cpp b/src/yuzu/startup_checks.cpp index fc2693f9d..9bb2a6ef4 100644 --- a/src/yuzu/startup_checks.cpp +++ b/src/yuzu/startup_checks.cpp | |||
| @@ -49,7 +49,7 @@ bool CheckEnvVars(bool* is_child) { | |||
| 49 | *is_child = true; | 49 | *is_child = true; |
| 50 | return false; | 50 | return false; |
| 51 | } else if (!SetEnvironmentVariableA(IS_CHILD_ENV_VAR, ENV_VAR_ENABLED_TEXT)) { | 51 | } else if (!SetEnvironmentVariableA(IS_CHILD_ENV_VAR, ENV_VAR_ENABLED_TEXT)) { |
| 52 | std::fprintf(stderr, "SetEnvironmentVariableA failed to set %s with error %d\n", | 52 | std::fprintf(stderr, "SetEnvironmentVariableA failed to set %s with error %lu\n", |
| 53 | IS_CHILD_ENV_VAR, GetLastError()); | 53 | IS_CHILD_ENV_VAR, GetLastError()); |
| 54 | return true; | 54 | return true; |
| 55 | } | 55 | } |
| @@ -62,7 +62,7 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka | |||
| 62 | // Set the startup variable for child processes | 62 | // Set the startup variable for child processes |
| 63 | const bool env_var_set = SetEnvironmentVariableA(STARTUP_CHECK_ENV_VAR, ENV_VAR_ENABLED_TEXT); | 63 | const bool env_var_set = SetEnvironmentVariableA(STARTUP_CHECK_ENV_VAR, ENV_VAR_ENABLED_TEXT); |
| 64 | if (!env_var_set) { | 64 | if (!env_var_set) { |
| 65 | std::fprintf(stderr, "SetEnvironmentVariableA failed to set %s with error %d\n", | 65 | std::fprintf(stderr, "SetEnvironmentVariableA failed to set %s with error %lu\n", |
| 66 | STARTUP_CHECK_ENV_VAR, GetLastError()); | 66 | STARTUP_CHECK_ENV_VAR, GetLastError()); |
| 67 | return false; | 67 | return false; |
| 68 | } | 68 | } |
| @@ -81,22 +81,22 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka | |||
| 81 | DWORD exit_code = STILL_ACTIVE; | 81 | DWORD exit_code = STILL_ACTIVE; |
| 82 | const int err = GetExitCodeProcess(process_info.hProcess, &exit_code); | 82 | const int err = GetExitCodeProcess(process_info.hProcess, &exit_code); |
| 83 | if (err == 0) { | 83 | if (err == 0) { |
| 84 | std::fprintf(stderr, "GetExitCodeProcess failed with error %d\n", GetLastError()); | 84 | std::fprintf(stderr, "GetExitCodeProcess failed with error %lu\n", GetLastError()); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | // Vulkan is broken if the child crashed (return value is not zero) | 87 | // Vulkan is broken if the child crashed (return value is not zero) |
| 88 | *has_broken_vulkan = (exit_code != 0); | 88 | *has_broken_vulkan = (exit_code != 0); |
| 89 | 89 | ||
| 90 | if (CloseHandle(process_info.hProcess) == 0) { | 90 | if (CloseHandle(process_info.hProcess) == 0) { |
| 91 | std::fprintf(stderr, "CloseHandle failed with error %d\n", GetLastError()); | 91 | std::fprintf(stderr, "CloseHandle failed with error %lu\n", GetLastError()); |
| 92 | } | 92 | } |
| 93 | if (CloseHandle(process_info.hThread) == 0) { | 93 | if (CloseHandle(process_info.hThread) == 0) { |
| 94 | std::fprintf(stderr, "CloseHandle failed with error %d\n", GetLastError()); | 94 | std::fprintf(stderr, "CloseHandle failed with error %lu\n", GetLastError()); |
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | if (!SetEnvironmentVariableA(STARTUP_CHECK_ENV_VAR, nullptr)) { | 98 | if (!SetEnvironmentVariableA(STARTUP_CHECK_ENV_VAR, nullptr)) { |
| 99 | std::fprintf(stderr, "SetEnvironmentVariableA failed to clear %s with error %d\n", | 99 | std::fprintf(stderr, "SetEnvironmentVariableA failed to clear %s with error %lu\n", |
| 100 | STARTUP_CHECK_ENV_VAR, GetLastError()); | 100 | STARTUP_CHECK_ENV_VAR, GetLastError()); |
| 101 | } | 101 | } |
| 102 | 102 | ||
| @@ -149,7 +149,7 @@ bool SpawnChild(const char* arg0, PROCESS_INFORMATION* pi, int flags) { | |||
| 149 | pi // lpProcessInformation | 149 | pi // lpProcessInformation |
| 150 | ); | 150 | ); |
| 151 | if (!process_created) { | 151 | if (!process_created) { |
| 152 | std::fprintf(stderr, "CreateProcessA failed with error %d\n", GetLastError()); | 152 | std::fprintf(stderr, "CreateProcessA failed with error %lu\n", GetLastError()); |
| 153 | return false; | 153 | return false; |
| 154 | } | 154 | } |
| 155 | 155 | ||