Fix some more analyzer errors

This commit is contained in:
Jaime Bernardo 2024-09-04 16:12:24 +01:00
parent 36dbf66150
commit d0a148f305
3 changed files with 5 additions and 5 deletions

View File

@ -934,7 +934,7 @@ LRESULT CALLBACK DemoTypeHookProc( int nCode, WPARAM wParam, LPARAM lParam )
}
}
}
[[fallthrough]];
case WM_KEYDOWN:
case WM_SYSKEYUP:
case WM_SYSKEYDOWN:

View File

@ -32,7 +32,7 @@ private:
bool m_cancel = false;
const wchar_t* m_className = L"ZoomitSelectRectangle";
UINT m_dpi;
UINT m_dpi{};
RECT m_oldClipRect{};
bool m_selected{ false };
bool m_setClip{ false };

View File

@ -2243,7 +2243,7 @@ INT_PTR CALLBACK OptionsProc( HWND hDlg, UINT message,
// Get the selected microphone
int index = static_cast<int>(SendMessage( GetDlgItem( g_OptionsTabs[RECORD_PAGE].hPage, IDC_MICROPHONE ), static_cast<UINT>(CB_GETCURSEL), static_cast<WPARAM>(0), static_cast<LPARAM>(0) ));
_tcscpy( g_MicrophoneDeviceId, index == 0 ? L"" : microphones[index - 1].first.c_str() );
_tcscpy( g_MicrophoneDeviceId, index == 0 ? L"" : microphones[static_cast<size_t>(index) - 1].first.c_str() );
if( newToggleKey && !RegisterHotKey( GetParent( hDlg ), ZOOM_HOTKEY, newToggleMod, newToggleKey & 0xFF )) {
@ -2611,8 +2611,8 @@ void DrawArrow( HDC hdc, int x1, int y1, int x2, int y2, double length, double w
bool UseGdiplus )
{
// get normalized dx/dy
double dx = x2 - x1;
double dy = y2 - y1;
double dx = static_cast<double>(x2) - x1;
double dy = static_cast<double>(y2) - y1;
double bodyLen = sqrt( dx*dx + dy*dy );
if ( bodyLen ) {
dx /= bodyLen;