diff --git a/Core/FileLoaders/LocalFileLoader.cpp b/Core/FileLoaders/LocalFileLoader.cpp index 232f3764a8..3f05fb4618 100644 --- a/Core/FileLoaders/LocalFileLoader.cpp +++ b/Core/FileLoaders/LocalFileLoader.cpp @@ -65,7 +65,7 @@ LocalFileLoader::LocalFileLoader(const std::string &filename) return; } LARGE_INTEGER end_offset; - const LARGE_INTEGER zero = { 0 }; + const LARGE_INTEGER zero{}; if (SetFilePointerEx(handle_, zero, &end_offset, FILE_END) == 0) { // Couldn't seek in the file. Close it and give up? This should never happen. CloseHandle(handle_); diff --git a/Windows/CaptureDevice.cpp b/Windows/CaptureDevice.cpp index 6d511f8b90..2154de868b 100644 --- a/Windows/CaptureDevice.cpp +++ b/Windows/CaptureDevice.cpp @@ -106,8 +106,8 @@ AudioFormatTransform g_AudioFormats[] = { const int g_cVideoFormats = ARRAYSIZE(g_VideoFormats); const int g_cAudioFormats = ARRAYSIZE(g_AudioFormats); -MediaParam defaultVideoParam = { 640, 480, 0, MFVideoFormat_RGB24 }; -MediaParam defaultAudioParam = { 44100, 2, 16, MFAudioFormat_PCM }; +MediaParam defaultVideoParam = { { 640, 480, 0, MFVideoFormat_RGB24 } }; +MediaParam defaultAudioParam = { { 44100, 2, 16, MFAudioFormat_PCM } }; HRESULT GetDefaultStride(IMFMediaType *pType, LONG *plStride); @@ -435,7 +435,7 @@ WindowsCaptureDevice::WindowsCaptureDevice(CAPTUREDEVIDE_TYPE _type) : errorMessage(""), state(CAPTUREDEVIDE_STATE::UNINITIALIZED) { param = { 0 }; - deviceParam = { 0 }; + deviceParam = { { 0 } }; switch (type) { case CAPTUREDEVIDE_TYPE::VIDEO: diff --git a/Windows/Debugger/CtrlRegisterList.cpp b/Windows/Debugger/CtrlRegisterList.cpp index be57cfdba7..9cd9f36c0a 100644 --- a/Windows/Debugger/CtrlRegisterList.cpp +++ b/Windows/Debugger/CtrlRegisterList.cpp @@ -255,7 +255,7 @@ void CtrlRegisterList::onPaint(WPARAM wParam, LPARAM lParam) { char temp[256]; int len; - u32 value; + u32 value = -1; switch (i) { diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 606fae6eb3..939edb6e3e 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -336,7 +336,7 @@ void CGEDebugger::UpdatePreviews() { return; } - GPUgstate state = {0}; + GPUgstate state{}; if (gpuDebug != nullptr) { state = gpuDebug->GetGState(); @@ -487,7 +487,7 @@ void CGEDebugger::PrimaryPreviewHover(int x, int y) { desc[0] = 0; } else if (x < 0 || y < 0) { // This means they left the area. - GPUgstate state = {0}; + GPUgstate state{}; if (gpuDebug != nullptr) { state = gpuDebug->GetGState(); } @@ -515,7 +515,7 @@ void CGEDebugger::SecondPreviewHover(int x, int y) { desc[0] = 0; } else if (x < 0 || y < 0) { // This means they left the area. - GPUgstate state = {0}; + GPUgstate state{}; if (gpuDebug != nullptr) { state = gpuDebug->GetGState(); } @@ -677,7 +677,7 @@ void CGEDebugger::DescribePixelRGBA(u32 pix, GPUDebugBufferFormat fmt, int x, in } void CGEDebugger::UpdateTextureLevel(int level) { - GPUgstate state = {0}; + GPUgstate state{}; if (gpuDebug != nullptr) { state = gpuDebug->GetGState(); } diff --git a/Windows/GEDebugger/SimpleGLWindow.cpp b/Windows/GEDebugger/SimpleGLWindow.cpp index a155b477e7..d9b60b7418 100644 --- a/Windows/GEDebugger/SimpleGLWindow.cpp +++ b/Windows/GEDebugger/SimpleGLWindow.cpp @@ -239,7 +239,7 @@ void SimpleGLWindow::Draw(const u8 *data, int w, int h, bool flipped, Format fmt GLint components = GL_RGBA; GLint memComponents = 0; - GLenum glfmt; + GLenum glfmt = GL_UNSIGNED_BYTE; const u8 *finalData = data; if (fmt == FORMAT_8888) { glPixelStorei(GL_UNPACK_ALIGNMENT, 4);