Bug 1521690 - Use Unused << instead of (void*) in nsWindow.cpp r=aklotz,jmathies

Casting non-void result to `void*` causes warning of clang.  Additionally,
perhaps, we should use `Unused <<` because of modern style.

And also this patch makes widget/windows is treated as "warning as errors"
because this patch fixes the last warning.

Differential Revision: https://phabricator.services.mozilla.com/D17216

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Masayuki Nakano 2019-02-01 20:15:04 +00:00
parent 0ac724fa85
commit 37b8ffe4a8
2 changed files with 1 additions and 4 deletions

View File

@ -160,6 +160,3 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
SOURCES['ToastNotification.cpp'].flags += ['-wd5038']
SOURCES['ToastNotificationHandler.cpp'].flags += ['-wd5038']
SOURCES['WindowsUIUtils.cpp'].flags += ['-wd5038']
if CONFIG['CC_TYPE'] == 'clang-cl':
AllowCompilerWarnings() # workaround for bug 1090497

View File

@ -4928,7 +4928,7 @@ bool nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
case MOZ_WM_STARTA11Y:
#if defined(ACCESSIBILITY)
(void*)GetAccessible();
Unused << GetAccessible();
result = true;
#else
result = false;