зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1479777 - Reduce clang-cl warnings from mozglue/misc/interceptor/. r=aklotz
--HG-- extra : source : 8b3d7161cbc7e582c79b3b28f961972af104a4f8 extra : intermediate-source : d434b3e9de5d973b031d685cfd7a2e8f8f3f8303
This commit is contained in:
Родитель
5dcd952f20
Коммит
8b236812bd
|
@ -25,7 +25,7 @@ protected:
|
|||
}
|
||||
|
||||
ReadOnlyTargetFunction<MMPolicyT>
|
||||
ResolveRedirectedAddress(const void* aOriginalFunction)
|
||||
ResolveRedirectedAddress(FARPROC aOriginalFunction)
|
||||
{
|
||||
ReadOnlyTargetFunction<MMPolicyT> origFn(mVMPolicy, aOriginalFunction);
|
||||
// If function entry is jmp rel8 stub to the internal implementation, we
|
||||
|
|
|
@ -401,7 +401,7 @@ protected:
|
|||
{
|
||||
*aOutTramp = nullptr;
|
||||
|
||||
Trampoline<MMPolicyT> tramp(mVMPolicy.GetNextTrampoline());
|
||||
Trampoline<MMPolicyT> tramp(this->mVMPolicy.GetNextTrampoline());
|
||||
if (!tramp) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Tuple.h"
|
||||
#include "mozilla/Types.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "mozilla/Vector.h"
|
||||
|
||||
#include <memory>
|
||||
|
@ -475,7 +476,7 @@ public:
|
|||
: mMMPolicy(aOther.mMMPolicy)
|
||||
, mBase(aOther.mBase)
|
||||
{
|
||||
mLocalBytes.appendAll(aOther.mLocalBytes);
|
||||
Unused << mLocalBytes.appendAll(aOther.mLocalBytes);
|
||||
}
|
||||
|
||||
ReadOnlyTargetBytes(const ReadOnlyTargetBytes& aOther,
|
||||
|
@ -487,8 +488,8 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
mLocalBytes.append(aOther.mLocalBytes.begin() + aOffsetFromOther,
|
||||
aOther.mLocalBytes.end());
|
||||
Unused << mLocalBytes.append(aOther.mLocalBytes.begin() + aOffsetFromOther,
|
||||
aOther.mLocalBytes.end());
|
||||
}
|
||||
|
||||
void EnsureLimit(uint32_t aDesiredLimit)
|
||||
|
@ -677,6 +678,13 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
ReadOnlyTargetFunction(const MMPolicy& aMMPolicy, FARPROC aFunc)
|
||||
: mTargetBytes(TargetBytesPtr<MMPolicy>::Make(aMMPolicy,
|
||||
reinterpret_cast<const void*>(aFunc)))
|
||||
, mOffset(0)
|
||||
{
|
||||
}
|
||||
|
||||
ReadOnlyTargetFunction(const MMPolicy& aMMPolicy, uintptr_t aFunc)
|
||||
: mTargetBytes(TargetBytesPtr<MMPolicy>::Make(aMMPolicy,
|
||||
reinterpret_cast<const void*>(aFunc)))
|
||||
|
@ -814,7 +822,7 @@ private:
|
|||
static auto Result(const MMPolicy& aPolicy, T* aValue)
|
||||
{
|
||||
ReadOnlyTargetFunction<MMPolicy> ptr(aPolicy, aValue);
|
||||
return ptr.ChasePointer<T>();
|
||||
return ptr.template ChasePointer<T>();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -824,7 +832,7 @@ public:
|
|||
auto ChasePointer()
|
||||
{
|
||||
mTargetBytes->EnsureLimit(mOffset + sizeof(T));
|
||||
const typename RemoveCV<T>::Type result = *reinterpret_cast<const RemoveCV<T>::Type*>(mTargetBytes->GetLocalBytes() + mOffset);
|
||||
const typename RemoveCV<T>::Type result = *reinterpret_cast<const typename RemoveCV<T>::Type*>(mTargetBytes->GetLocalBytes() + mOffset);
|
||||
return ChasePointerHelper<typename RemoveCV<T>::Type>::Result(mTargetBytes->GetMMPolicy(), result);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,6 +106,7 @@ public:
|
|||
::InitializeCriticalSectionEx(&sCS, 4000, flags);
|
||||
return true;
|
||||
}();
|
||||
Unused << isAlloc;
|
||||
}
|
||||
|
||||
explicit operator bool() const
|
||||
|
|
|
@ -168,11 +168,11 @@ private:
|
|||
struct MOZ_RAII InitOnceContext final
|
||||
{
|
||||
InitOnceContext(ThisType* aHook, InterceptorT* aInterceptor,
|
||||
const char* aName, void* aHookDest, bool aForceDetour)
|
||||
const char* aName, FuncPtrT aHookDest, bool aForceDetour)
|
||||
: mHook(aHook)
|
||||
, mInterceptor(aInterceptor)
|
||||
, mName(aName)
|
||||
, mHookDest(aHookDest)
|
||||
, mHookDest(reinterpret_cast<void*>(aHookDest))
|
||||
, mForceDetour(aForceDetour)
|
||||
{
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче