Bug 1455830 - Fix -Wunused-lambda-capture warning in nsStandardURL::SetPassword r=me
authorValentin Gosu <valentin.gosu@gmail.com>
Sun, 22 Apr 2018 20:24:12 +0200
changeset 414999 91694a86688d7a2d7ecc0c00bda3286527d0c365
parent 414998 ebdbae0764b8b7dcd221351d357ba55db1320e11
child 415000 378a8a64401f765bfd0706ff678a4f5db7c05385
child 415016 c106f1118f7f49c3471cdb0528133d7515645270
push id33885
push usertoros@mozilla.com
push dateSun, 22 Apr 2018 22:12:17 +0000
treeherdermozilla-central@378a8a64401f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1455830
milestone61.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 1455830 - Fix -Wunused-lambda-capture warning in nsStandardURL::SetPassword r=me
netwerk/base/nsStandardURL.cpp
--- a/netwerk/base/nsStandardURL.cpp
+++ b/netwerk/base/nsStandardURL.cpp
@@ -1800,16 +1800,17 @@ nsStandardURL::SetPassword(const nsACStr
     const nsPromiseFlatCString &password = PromiseFlatCString(input);
 
     auto clearedPassword = MakeScopeExit([&password, this]() {
         // Check that if this method is called with the empty string then the
         // password is definitely cleared when exiting this method.
         if (password.IsEmpty()) {
             MOZ_DIAGNOSTIC_ASSERT(this->Password().IsEmpty());
         }
+        Unused << this; // silence compiler -Wunused-lambda-capture
     });
 
     LOG(("nsStandardURL::SetPassword [password=%s]\n", password.get()));
 
     if (mURLType == URLTYPE_NO_AUTHORITY) {
         if (password.IsEmpty())
             return NS_OK;
         NS_WARNING("cannot set password on no-auth url");