No bug - Fix compiler warnings on Windows.
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 12 Oct 2018 15:21:40 -0700
changeset 489362 0c5f5c2e2a860f9f681e301662aabe2deca8be4b
parent 489361 64298e3625ed2a90ec6b64bfba0fb630ab607d2b
child 489363 8421b16c011ba49a2e495f81853b282413aa7650
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
milestone64.0a1
No bug - Fix compiler warnings on Windows.
dom/plugins/test/testplugin/nptest_windows.cpp
gfx/thebes/gfxGDIFontList.cpp
gfx/thebes/gfxWindowsPlatform.cpp
--- a/dom/plugins/test/testplugin/nptest_windows.cpp
+++ b/dom/plugins/test/testplugin/nptest_windows.cpp
@@ -66,18 +66,16 @@ bool
 pluginSupportsWindowlessMode()
 {
   return true;
 }
 
 NPError
 pluginInstanceInit(InstanceData* instanceData)
 {
-  NPP npp = instanceData->npp;
-
   instanceData->platformData = static_cast<PlatformData*>
     (NPN_MemAlloc(sizeof(PlatformData)));
   if (!instanceData->platformData)
     return NPERR_OUT_OF_MEMORY_ERROR;
 
   instanceData->platformData->childWindow = nullptr;
   instanceData->platformData->device = nullptr;
   instanceData->platformData->frontBuffer = nullptr;
--- a/gfx/thebes/gfxGDIFontList.cpp
+++ b/gfx/thebes/gfxGDIFontList.cpp
@@ -655,19 +655,18 @@ gfxGDIFontList::InitFontListForPlatform(
     mNonExistingFonts.Clear();
 
     // iterate over available families
     LOGFONTW logfont;
     memset(&logfont, 0, sizeof(logfont));
     logfont.lfCharSet = DEFAULT_CHARSET;
 
     AutoDC hdc;
-    int result = EnumFontFamiliesExW(hdc.GetDC(), &logfont,
-                                     (FONTENUMPROCW)&EnumFontFamExProc,
-                                     0, 0);
+    (void)EnumFontFamiliesExW(hdc.GetDC(), &logfont,
+                              (FONTENUMPROCW)&EnumFontFamExProc, 0, 0);
 
     GetFontSubstitutes();
 
     GetPrefsAndStartLoader();
 
     return NS_OK;
 }
 
--- a/gfx/thebes/gfxWindowsPlatform.cpp
+++ b/gfx/thebes/gfxWindowsPlatform.cpp
@@ -1293,27 +1293,27 @@ gfxWindowsPlatform::IsOptimus()
         {
             knowIsOptimus = 1;
         } else {
             knowIsOptimus = 0;
         }
     }
     return knowIsOptimus;
 }
-
+/*
 static inline bool
 IsWARPStable()
 {
   // It seems like nvdxgiwrap makes a mess of WARP. See bug 1154703.
   if (!IsWin8OrLater() || GetModuleHandleA("nvdxgiwrap.dll")) {
     return false;
   }
   return true;
 }
-
+*/
 static void
 InitializeANGLEConfig()
 {
   FeatureState& d3d11ANGLE = gfxConfig::GetFeature(Feature::D3D11_HW_ANGLE);
 
   if (!gfxConfig::IsEnabled(Feature::D3D11_COMPOSITING)) {
     d3d11ANGLE.DisableByDefault(FeatureStatus::Unavailable, "D3D11 compositing is disabled",
                                 NS_LITERAL_CSTRING("FEATURE_FAILURE_D3D11_DISABLED"));