diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index aae90c82..6e97acec 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -1251,7 +1251,7 @@ namespace dxvk { HRESULT STDMETHODCALLTYPE D3D11Device::GetDeviceRemovedReason() { - static std::atomic s_errorShown = false; + static std::atomic s_errorShown = { false }; if (!s_errorShown.exchange(true)) Logger::warn("D3D11Device::GetDeviceRemovedReason: Stub"); diff --git a/src/dxgi/dxgi_output.cpp b/src/dxgi/dxgi_output.cpp index da57e6de..a2a26dc2 100644 --- a/src/dxgi/dxgi_output.cpp +++ b/src/dxgi/dxgi_output.cpp @@ -55,8 +55,9 @@ namespace dxvk { if (pDesc == nullptr) return DXGI_ERROR_INVALID_CALL; - ::MONITORINFOEX monInfo = { sizeof(monInfo) }; - + ::MONITORINFOEX monInfo; + + monInfo.cbSize = sizeof(monInfo); if (!::GetMonitorInfo(m_monitor, &monInfo)) { Logger::err("DxgiOutput: Failed to query monitor info"); return E_FAIL; @@ -82,8 +83,9 @@ namespace dxvk { return DXGI_ERROR_INVALID_CALL; // Query monitor info to get the device name - ::MONITORINFOEX monInfo = { sizeof(monInfo) }; - + ::MONITORINFOEX monInfo; + + monInfo.cbSize = sizeof(monInfo); if (!::GetMonitorInfo(m_monitor, &monInfo)) { Logger::err("DxgiOutput: Failed to query monitor info"); return E_FAIL; diff --git a/tests/dxbc/test_dxbc_disasm.cpp b/tests/dxbc/test_dxbc_disasm.cpp index 40cbbbce..57d621a8 100644 --- a/tests/dxbc/test_dxbc_disasm.cpp +++ b/tests/dxbc/test_dxbc_disasm.cpp @@ -1,5 +1,6 @@ #include #include +#include #include @@ -46,9 +47,7 @@ int WINAPI WinMain(HINSTANCE hInstance, return 1; } - std::string data; - data.resize(assembly->GetBufferSize()); - std::memcpy(data.data(), assembly->GetBufferPointer(), data.size()); + std::string data((const char *)assembly->GetBufferPointer(), assembly->GetBufferSize()); std::cout << data; return 0; } diff --git a/tests/dxbc/test_hlsl_compiler.cpp b/tests/dxbc/test_hlsl_compiler.cpp index 8b9a204c..fc447e43 100644 --- a/tests/dxbc/test_hlsl_compiler.cpp +++ b/tests/dxbc/test_hlsl_compiler.cpp @@ -1,5 +1,6 @@ #include #include +#include #include