From 9b48c3fa58c4926341e1668fdfec131ada3147a1 Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 10 Aug 2018 15:21:45 -0500 Subject: Remove the const to fix the -Wignored-qualifiers warning with GCC 8 (Part 2) --- dom/bindings/BindingUtils.cpp | 4 ++-- embedding/components/find/nsFind.cpp | 2 +- toolkit/components/downloads/ApplicationReputation.cpp | 2 +- toolkit/components/url-classifier/Entries.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dom/bindings/BindingUtils.cpp b/dom/bindings/BindingUtils.cpp index 7056658a7..323feca52 100644 --- a/dom/bindings/BindingUtils.cpp +++ b/dom/bindings/BindingUtils.cpp @@ -119,7 +119,7 @@ ThrowInvalidThis(JSContext* aCx, const JS::CallArgs& aArgs, MSG_METHOD_THIS_DOES_NOT_IMPLEMENT_INTERFACE; MOZ_RELEASE_ASSERT(GetErrorArgCount(errorNumber) <= 2); JS_ReportErrorNumberUC(aCx, GetErrorMessage, nullptr, - static_cast(errorNumber), + static_cast(errorNumber), funcNameStr.get(), ifaceName.get()); return false; } @@ -226,7 +226,7 @@ TErrorResult::SetPendingExceptionWithMessage(JSContext* aCx) args[argCount] = nullptr; JS_ReportErrorNumberUCArray(aCx, dom::GetErrorMessage, nullptr, - static_cast(message->mErrorNumber), + static_cast(message->mErrorNumber), argCount > 0 ? args : nullptr); ClearMessage(); diff --git a/embedding/components/find/nsFind.cpp b/embedding/components/find/nsFind.cpp index cbc42298b..5fc1f9db6 100644 --- a/embedding/components/find/nsFind.cpp +++ b/embedding/components/find/nsFind.cpp @@ -33,7 +33,7 @@ using namespace mozilla; // Yikes! Casting a char to unichar can fill with ones! -#define CHAR_TO_UNICHAR(c) ((char16_t)(const unsigned char)c) +#define CHAR_TO_UNICHAR(c) ((char16_t)(unsigned char)c) static NS_DEFINE_CID(kCContentIteratorCID, NS_CONTENTITERATOR_CID); static NS_DEFINE_CID(kCPreContentIteratorCID, NS_PRECONTENTITERATOR_CID); diff --git a/toolkit/components/downloads/ApplicationReputation.cpp b/toolkit/components/downloads/ApplicationReputation.cpp index 7bd219dbf..1c94d6713 100644 --- a/toolkit/components/downloads/ApplicationReputation.cpp +++ b/toolkit/components/downloads/ApplicationReputation.cpp @@ -1000,7 +1000,7 @@ PendingLookup::GetSpecHash(nsACString& aSpec, nsACString& hexEncodedHash) static const char* const hex = "0123456789ABCDEF"; hexEncodedHash.SetCapacity(2 * binaryHash.Length()); for (size_t i = 0; i < binaryHash.Length(); ++i) { - auto c = static_cast(binaryHash[i]); + auto c = static_cast(binaryHash[i]); hexEncodedHash.Append(hex[(c >> 4) & 0x0F]); hexEncodedHash.Append(hex[c & 0x0F]); } diff --git a/toolkit/components/url-classifier/Entries.h b/toolkit/components/url-classifier/Entries.h index 969f4f739..b7fb34516 100644 --- a/toolkit/components/url-classifier/Entries.h +++ b/toolkit/components/url-classifier/Entries.h @@ -100,7 +100,7 @@ struct SafebrowsingHash aStr.SetCapacity(2 * len); for (size_t i = 0; i < len; ++i) { - const char c = static_cast(buf[i]); + const char c = static_cast(buf[i]); aStr.Append(lut[(c >> 4) & 0x0F]); aStr.Append(lut[c & 15]); } -- cgit v1.2.3