[Analyzers][CPP]Changes to fix warning 26493 on src/modules/ (S to V) (#23625)

Modules starting with S to V
This commit is contained in:
sosssego
2023-02-08 11:15:16 +00:00
committed by GitHub
parent b13f74c089
commit 49b2823056
10 changed files with 88 additions and 72 deletions

View File

@@ -209,7 +209,7 @@ void Toolbar::show(std::wstring position, std::wstring monitorString)
wc.hInstance = GetModuleHandleW(nullptr);
wc.lpszClassName = CLASS_NAME;
wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
wc.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_WINDOW);
wc.lpfnWndProc = WindowProcessMessages;
RegisterClassW(&wc);
@@ -282,7 +282,7 @@ void Toolbar::show(std::wstring position, std::wstring monitorString)
auto transparentColorKey = RGB(0, 0, 255);
HBRUSH brush = CreateSolidBrush(transparentColorKey);
SetClassLongPtr(hwnd, GCLP_HBRBACKGROUND, (LONG_PTR)brush);
SetClassLongPtr(hwnd, GCLP_HBRBACKGROUND, reinterpret_cast<LONG_PTR>(brush));
SetLayeredWindowAttributes(hwnd, transparentColorKey, 0, LWA_COLORKEY);

View File

@@ -111,7 +111,7 @@ bool ReencodeJPGImage(BYTE* imageBuf, const DWORD imageSize, DWORD& reencodedSiz
auto jpgStreamMemory = static_cast<uint8_t*>(GlobalLock(streamMemoryHandle));
std::copy(jpgStreamMemory, jpgStreamMemory + jpgStreamSize, imageBuf);
auto unlockJpgStreamMemory = wil::scope_exit([jpgStreamMemory] { GlobalUnlock(jpgStreamMemory); });
reencodedSize = (DWORD)jpgStreamSize;
reencodedSize = static_cast<DWORD>(jpgStreamSize);
return true;
}

View File

@@ -349,7 +349,7 @@ HRESULT VideoCaptureProxyPin::Get(
return E_UNEXPECTED;
}
*(GUID*)pPropData = PIN_CATEGORY_CAPTURE;
*static_cast<GUID*>(pPropData) = PIN_CATEGORY_CAPTURE;
LOG("VideoCaptureProxyPin::Get SUCCESS");
return S_OK;