From a52bf9e82b1746c7c58f6b2aa1610886179aa68c Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 10 Aug 2018 15:04:21 -0500 Subject: [PATCH] Remove the const to fix the -Wignored-qualifiers warning with GCC 8 --- dom/bindings/ErrorResult.h | 2 +- netwerk/cache/nsDiskCacheEntry.h | 2 +- xpcom/glue/nsTHashtable.h | 4 ++-- xpcom/string/nsReadableUtilsImpl.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dom/bindings/ErrorResult.h b/dom/bindings/ErrorResult.h index 7c3fc9e2f9..da7ec30e71 100644 --- a/dom/bindings/ErrorResult.h +++ b/dom/bindings/ErrorResult.h @@ -75,7 +75,7 @@ template inline bool ThrowErrorMessage(JSContext* aCx, const ErrNum aErrorNumber, Ts&&... aArgs) { - binding_detail::ThrowErrorMessage(aCx, static_cast(aErrorNumber), + binding_detail::ThrowErrorMessage(aCx, static_cast(aErrorNumber), mozilla::Forward(aArgs)...); return false; } diff --git a/netwerk/cache/nsDiskCacheEntry.h b/netwerk/cache/nsDiskCacheEntry.h index 3bec330536..506886cb7c 100644 --- a/netwerk/cache/nsDiskCacheEntry.h +++ b/netwerk/cache/nsDiskCacheEntry.h @@ -32,7 +32,7 @@ struct nsDiskCacheEntry { mKeySize + mMetaDataSize; } - char* Key() { return reinterpret_cast(this) + + char* Key() { return reinterpret_cast(this) + sizeof(nsDiskCacheEntry); } diff --git a/xpcom/glue/nsTHashtable.h b/xpcom/glue/nsTHashtable.h index 705b0294e2..830f52e881 100644 --- a/xpcom/glue/nsTHashtable.h +++ b/xpcom/glue/nsTHashtable.h @@ -372,7 +372,7 @@ template PLDHashNumber nsTHashtable::s_HashKey(const void* aKey) { - return EntryType::HashKey(static_cast(aKey)); + return EntryType::HashKey(static_cast(aKey)); } template @@ -381,7 +381,7 @@ nsTHashtable::s_MatchEntry(const PLDHashEntryHdr* aEntry, const void* aKey) { return ((const EntryType*)aEntry)->KeyEquals( - static_cast(aKey)); + static_cast(aKey)); } template diff --git a/xpcom/string/nsReadableUtilsImpl.h b/xpcom/string/nsReadableUtilsImpl.h index ff1497b514..94f18dffc6 100644 --- a/xpcom/string/nsReadableUtilsImpl.h +++ b/xpcom/string/nsReadableUtilsImpl.h @@ -18,7 +18,7 @@ inline bool IsASCII(char16_t aChar) { inline const char16_t* aligned(const char16_t* aPtr, const uintptr_t aMask) { return reinterpret_cast( - reinterpret_cast(aPtr) & ~aMask); + reinterpret_cast(aPtr) & ~aMask); } /**