Bug 1499864 - WindowsNetworkFunctionsWrapper's dtor should be virtual. r=bagder
authorJeff Gilbert <jgilbert@mozilla.com>
Thu, 18 Oct 2018 08:57:46 +0000
changeset 490376 9e0a42364ef5fd6fd57d06a5df8113d34cb4b7f0
parent 490375 7b439431eb95b33e5619ac6c4cd07de948afe7b6
child 490377 d12de5ab68a2371f00fd20575f225ffeed8e41a0
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersbagder
bugs1499864
milestone64.0a1
Bug 1499864 - WindowsNetworkFunctionsWrapper's dtor should be virtual. r=bagder Also delete declaration of an unused var. Both of these are compile warnings on win64 clang-cl. MozReview-Commit-ID: aOBmtxgpz6 Differential Revision: https://phabricator.services.mozilla.com/D9029
toolkit/system/windowsDHCPClient/DHCPUtils.cpp
toolkit/system/windowsDHCPClient/WindowsNetworkFunctionsWrapper.h
--- a/toolkit/system/windowsDHCPClient/DHCPUtils.cpp
+++ b/toolkit/system/windowsDHCPClient/DHCPUtils.cpp
@@ -36,17 +36,16 @@ IsCurrentAndHasDHCP(PIP_ADAPTER_ADDRESSE
 }
 
 nsresult
 GetActiveDHCPNetworkAdapterName(nsACString& aNetworkAdapterName,
     WindowsNetworkFunctionsWrapper* aWindowsNetworkFunctionsWrapper)
 {
   /* Declare and initialize variables */
 
-  uint32_t dwSize = 0;
   uint32_t dwRetVal = 0;
   nsresult rv = NS_ERROR_FAILURE;
 
   // Set the flags to pass to GetAdaptersAddresses
   uint32_t flags = GAA_FLAG_INCLUDE_PREFIX;
 
   // default to unspecified address family (both)
   uint32_t family = AF_UNSPEC;
--- a/toolkit/system/windowsDHCPClient/WindowsNetworkFunctionsWrapper.h
+++ b/toolkit/system/windowsDHCPClient/WindowsNetworkFunctionsWrapper.h
@@ -44,17 +44,17 @@ class WindowsNetworkFunctionsWrapper : n
     _In_    DHCPCAPI_PARAMS_ARRAY aSendParams,
     _Inout_ DHCPCAPI_PARAMS_ARRAY aRecdParams,
     _In_    LPBYTE                aBuffer,
     _Inout_ LPDWORD               apSize,
     _In_    LPWSTR                aRequestIdStr
   );
 
   protected:
-    ~WindowsNetworkFunctionsWrapper(){};
+    virtual ~WindowsNetworkFunctionsWrapper(){};
 
 };
 
 } // namespace windowsDHCPClient
 } // namespace system
 } // namespace toolkit
 } // namespace mozilla
 #endif //mozilla_toolkit_system_windowsDHCPClient_windowsNetworkFunctionsWrapper_h