From a626272bde7c7d4a941bef554135141b8f4dd22b Mon Sep 17 00:00:00 2001 From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> Date: Wed, 20 Sep 2023 09:49:03 -0400 Subject: [PATCH] [Analyzers] Fix for C26495 --- src/modules/Hosts/HostsModuleInterface/dllmain.cpp | 6 +++--- src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h | 2 +- src/modules/awake/AwakeModuleInterface/dllmain.cpp | 6 +++--- .../poweraccent/PowerAccentModuleInterface/dllmain.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modules/Hosts/HostsModuleInterface/dllmain.cpp b/src/modules/Hosts/HostsModuleInterface/dllmain.cpp index e971bc3f77..bd3067aaac 100644 --- a/src/modules/Hosts/HostsModuleInterface/dllmain.cpp +++ b/src/modules/Hosts/HostsModuleInterface/dllmain.cpp @@ -49,11 +49,11 @@ private: //contains the non localized key of the powertoy std::wstring app_key; - HANDLE m_hProcess; + HANDLE m_hProcess{}; - HANDLE m_hShowEvent; + HANDLE m_hShowEvent{}; - HANDLE m_hShowAdminEvent; + HANDLE m_hShowAdminEvent{}; bool is_process_running() { diff --git a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h b/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h index 440bae0021..0b84f377fd 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h +++ b/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h @@ -93,7 +93,7 @@ private: std::mutex tasklist_cv_mutex; std::condition_variable tasklist_cv; - HTHUMBNAIL thumbnail; + HTHUMBNAIL thumbnail{}; HWND active_window = nullptr; bool active_window_snappable = false; D2DOverlaySVG landscape, portrait; diff --git a/src/modules/awake/AwakeModuleInterface/dllmain.cpp b/src/modules/awake/AwakeModuleInterface/dllmain.cpp index 027eb9913c..1baa409abc 100644 --- a/src/modules/awake/AwakeModuleInterface/dllmain.cpp +++ b/src/modules/awake/AwakeModuleInterface/dllmain.cpp @@ -44,9 +44,9 @@ class Awake : public PowertoyModuleIface private: bool m_enabled = false; - HANDLE send_telemetry_event; - HANDLE m_hInvokeEvent; - PROCESS_INFORMATION p_info; + HANDLE send_telemetry_event{}; + HANDLE m_hInvokeEvent{}; + PROCESS_INFORMATION p_info{}; bool is_process_running() { diff --git a/src/modules/poweraccent/PowerAccentModuleInterface/dllmain.cpp b/src/modules/poweraccent/PowerAccentModuleInterface/dllmain.cpp index d726166c41..04106c65ea 100644 --- a/src/modules/poweraccent/PowerAccentModuleInterface/dllmain.cpp +++ b/src/modules/poweraccent/PowerAccentModuleInterface/dllmain.cpp @@ -46,8 +46,8 @@ class PowerAccent : public PowertoyModuleIface private: bool m_enabled = false; - HANDLE m_hInvokeEvent; - PROCESS_INFORMATION p_info; + HANDLE m_hInvokeEvent{}; + PROCESS_INFORMATION p_info{}; bool is_process_running() {