Bug 1392684 Remove const qualifier that gets discarded after function return in mscom::AgileReference draft
authorTom Ritter <tom@mozilla.com>
Tue, 22 Aug 2017 17:25:27 -0500
changeset 650797 5e0c8f1e23dab831d7a3ac412acc59f804c1e709
parent 650796 c9fea816f0d6ad2ff1399e669168d67cb543d47d
child 727499 faab483897aa2a6eb4fe77b88a5408e755f97804
push id75498
push userbmo:tom@mozilla.com
push dateTue, 22 Aug 2017 22:26:19 +0000
bugs1392684
milestone57.0a1
Bug 1392684 Remove const qualifier that gets discarded after function return in mscom::AgileReference gcc throws a warning-as-error saying that the const qualifier will be ignored by function callers. Remove the const qualifier to remove the warning. MozReview-Commit-ID: JRQMz6Zdcdz
ipc/mscom/AgileReference.cpp
old mode 100644
new mode 100755
--- a/ipc/mscom/AgileReference.cpp
+++ b/ipc/mscom/AgileReference.cpp
@@ -130,17 +130,17 @@ AgileReference::Resolve(REFIID aIid, voi
   return originalInterface->QueryInterface(aIid, aOutInterface);
 }
 
 IGlobalInterfaceTable*
 AgileReference::ObtainGit()
 {
   // Internally to COM, the Global Interface Table is a singleton, therefore we
   // don't worry about holding onto this reference indefinitely.
-  static IGlobalInterfaceTable * const sGit = []() -> IGlobalInterfaceTable * const {
+  static IGlobalInterfaceTable* sGit = []() -> IGlobalInterfaceTable* {
     IGlobalInterfaceTable* result = nullptr;
     DebugOnly<HRESULT> hr =
       ::CoCreateInstance(CLSID_StdGlobalInterfaceTable, nullptr,
                          CLSCTX_INPROC_SERVER, IID_IGlobalInterfaceTable,
                          reinterpret_cast<void**>(&result));
     MOZ_ASSERT(SUCCEEDED(hr));
     return result;
   }();