Bug 1404147 Cast constants to the type they are compared to r?smaug
MozReview-Commit-ID: JQDZTBOALZm
--- a/js/xpconnect/src/XPCWrappedNative.cpp
+++ b/js/xpconnect/src/XPCWrappedNative.cpp
@@ -851,18 +851,18 @@ XPCWrappedNative::FlatJSObjectFinalized(
cache->ClearWrapper(mFlatJSObject.unbarrieredGetPtr());
mFlatJSObject = nullptr;
mFlatJSObject.unsetFlags(FLAT_JS_OBJECT_VALID);
MOZ_ASSERT(mIdentity, "bad pointer!");
#ifdef XP_WIN
// Try to detect free'd pointer
- MOZ_ASSERT(*(int*)mIdentity.get() != 0xdddddddd, "bad pointer!");
- MOZ_ASSERT(*(int*)mIdentity.get() != 0, "bad pointer!");
+ MOZ_ASSERT(*(int*)mIdentity.get() != (int)0xdddddddd, "bad pointer!");
+ MOZ_ASSERT(*(int*)mIdentity.get() != (int)0, "bad pointer!");
#endif
if (IsWrapperExpired()) {
Destroy();
}
// Note that it's not safe to touch mNativeWrapper here since it's
// likely that it has already been finalized.
--- a/netwerk/dns/GetAddrInfo.cpp
+++ b/netwerk/dns/GetAddrInfo.cpp
@@ -215,31 +215,31 @@ static MOZ_ALWAYS_INLINE nsresult
if (!dnsapi) {
LOG_WARNING("GetAddrInfo has been shutdown or has not been initialized.");
return NS_ERROR_NOT_INITIALIZED;
}
// In order to avoid using ANY records which are not always implemented as a
// "Gimme what you have" request in hostname resolvers, we should send A
// and/or AAAA requests, based on the address family requested.
- unsigned int ttl = -1;
+ unsigned int ttl = (unsigned int)-1;
if (aAddressFamily == PR_AF_UNSPEC || aAddressFamily == PR_AF_INET) {
_GetMinTTLForRequestType_Windows(dnsapi, aHost, DNS_TYPE_A, &ttl);
}
if (aAddressFamily == PR_AF_UNSPEC || aAddressFamily == PR_AF_INET6) {
_GetMinTTLForRequestType_Windows(dnsapi, aHost, DNS_TYPE_AAAA, &ttl);
}
{
// dnsapi's destructor is not thread-safe, so we release explicitly here
OffTheBooksMutexAutoLock lock(*gDnsapiInfoLock);
dnsapi = nullptr;
}
- if (ttl == -1) {
+ if (ttl == (unsigned int)-1) {
LOG("No useable TTL found.");
return NS_ERROR_FAILURE;
}
*aResult = ttl;
return NS_OK;
}
#endif