Bug 1521690 - Use `Unused <<` instead of `(void*)` in nsWindow.cpp r=aklotz,jmathies
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 01 Feb 2019 20:15:04 +0000
changeset 456574 8a968b7beaba6fb6f5e6323298db98501e28ef44
parent 456573 a03c30492ed7a3f68a666f9927998838a48fd398
child 456575 1d868390c454251d1ad828eada546bcdf3b0c302
push id35490
push useraiakab@mozilla.com
push dateSun, 03 Feb 2019 09:50:26 +0000
treeherdermozilla-central@12b2328eedd1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaklotz, jmathies
bugs1521690
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
widget/windows/moz.build
widget/windows/nsWindow.cpp
--- a/widget/windows/moz.build
+++ b/widget/windows/moz.build
@@ -155,11 +155,8 @@ if CONFIG['CC_TYPE'] in ('msvc', 'clang-
     SOURCES += [
         'ToastNotification.cpp',
         'ToastNotificationHandler.cpp',
     ]
     # C5038: Suppress initializer list order warnings from wrl.h
     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
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4923,17 +4923,17 @@ bool nsWindow::ProcessMessage(UINT msg, 
         sCanQuit = abortQuit ? TRI_FALSE : TRI_TRUE;
       }
       *aRetValue = sCanQuit ? TRUE : FALSE;
       result = true;
       break;
 
     case MOZ_WM_STARTA11Y:
 #if defined(ACCESSIBILITY)
-      (void*)GetAccessible();
+      Unused << GetAccessible();
       result = true;
 #else
       result = false;
 #endif
       break;
 
     case WM_ENDSESSION:
     case MOZ_WM_APP_QUIT: