Bug 1732208 - Silence the unused-but-set-variable warning in widget. r=cmartin

widget/windows/nsAppShell.cpp(685,10): error: variable 'uiMessage' set but not used [-Werror,-Wunused-but-set-variable]
    bool uiMessage = false;
         ^
widget/windows/TaskbarPreview.cpp(370,11): error: variable 'hr' set but not used [-Werror,-Wunused-but-set-variable]
  HRESULT hr;
          ^

Differential Revision: https://phabricator.services.mozilla.com/D126461
This commit is contained in:
Mike Hommey 2021-09-28 00:02:48 +00:00
Родитель 81148e0adf
Коммит b386a9ea29
2 изменённых файлов: 1 добавлений и 6 удалений

Просмотреть файл

@ -375,6 +375,7 @@ TaskbarPreviewCallback::Done(nsISupports* aCanvas, bool aDrawBorder) {
hr = DwmSetIconicThumbnail(mPreview->PreviewWindow(), hBitmap, flags);
}
MOZ_ASSERT(SUCCEEDED(hr));
(void)hr;
return NS_OK;
}

Просмотреть файл

@ -682,7 +682,6 @@ bool nsAppShell::ProcessNextNativeEvent(bool mayWait) {
do {
MSG msg;
bool uiMessage = false;
// For avoiding deadlock between our process and plugin process by
// mouse wheel messages, we're handling actually when we receive one of
@ -696,15 +695,10 @@ bool nsAppShell::ProcessNextNativeEvent(bool mayWait) {
MOZ_WM_MOUSEWHEEL_LAST, PM_REMOVE);
NS_ASSERTION(gotMessage,
"waiting internal wheel message, but it has not come");
uiMessage = gotMessage;
}
if (!gotMessage) {
gotMessage = WinUtils::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE);
uiMessage =
(msg.message >= WM_KEYFIRST && msg.message <= WM_IME_KEYLAST) ||
(msg.message >= NS_WM_IMEFIRST && msg.message <= NS_WM_IMELAST) ||
(msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST);
}
if (gotMessage) {