mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix -Wc++11-narrowing compile errors with llvm-mingw.
This commit is contained in:
parent
8b597820f4
commit
02b2913638
@ -746,7 +746,7 @@ CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk,
|
||||
{ CKA_ID, objID->data, objID->len },
|
||||
{ CKA_EC_PARAMS, params->data, params->len },
|
||||
{ CKA_EC_POINT, ecPoint->data, ecPoint->len },
|
||||
{ CKA_VALUE, (void*) d.Elements(), d.Length() },
|
||||
{ CKA_VALUE, (void*) d.Elements(), static_cast<CK_ULONG>(d.Length()) },
|
||||
};
|
||||
|
||||
return PrivateKeyFromPrivateKeyTemplate(objID, keyTemplate,
|
||||
@ -793,14 +793,14 @@ CryptoKey::PrivateKeyFromJwk(const JsonWebKey& aJwk,
|
||||
{ CKA_SENSITIVE, &falseValue, sizeof(falseValue) },
|
||||
{ CKA_PRIVATE, &falseValue, sizeof(falseValue) },
|
||||
{ CKA_ID, objID->data, objID->len },
|
||||
{ CKA_MODULUS, (void*) n.Elements(), n.Length() },
|
||||
{ CKA_PUBLIC_EXPONENT, (void*) e.Elements(), e.Length() },
|
||||
{ CKA_PRIVATE_EXPONENT, (void*) d.Elements(), d.Length() },
|
||||
{ CKA_PRIME_1, (void*) p.Elements(), p.Length() },
|
||||
{ CKA_PRIME_2, (void*) q.Elements(), q.Length() },
|
||||
{ CKA_EXPONENT_1, (void*) dp.Elements(), dp.Length() },
|
||||
{ CKA_EXPONENT_2, (void*) dq.Elements(), dq.Length() },
|
||||
{ CKA_COEFFICIENT, (void*) qi.Elements(), qi.Length() },
|
||||
{ CKA_MODULUS, (void*) n.Elements(), static_cast<CK_ULONG>(n.Length()) },
|
||||
{ CKA_PUBLIC_EXPONENT, (void*) e.Elements(), static_cast<CK_ULONG>(e.Length()) },
|
||||
{ CKA_PRIVATE_EXPONENT, (void*) d.Elements(), static_cast<CK_ULONG>(d.Length()) },
|
||||
{ CKA_PRIME_1, (void*) p.Elements(), static_cast<CK_ULONG>(p.Length()) },
|
||||
{ CKA_PRIME_2, (void*) q.Elements(), static_cast<CK_ULONG>(q.Length()) },
|
||||
{ CKA_EXPONENT_1, (void*) dp.Elements(), static_cast<CK_ULONG>(dp.Length()) },
|
||||
{ CKA_EXPONENT_2, (void*) dq.Elements(), static_cast<CK_ULONG>(dq.Length()) },
|
||||
{ CKA_COEFFICIENT, (void*) qi.Elements(), static_cast<CK_ULONG>(qi.Length()) },
|
||||
};
|
||||
|
||||
return PrivateKeyFromPrivateKeyTemplate(objID, keyTemplate,
|
||||
|
@ -3385,12 +3385,12 @@ PluginInstanceChild::UpdateWindowAttributes(bool aForceSetWindow)
|
||||
WINDOWPOS winpos = {
|
||||
0, 0,
|
||||
mWindow.x, mWindow.y,
|
||||
mWindow.width, mWindow.height,
|
||||
static_cast<int>(mWindow.width), static_cast<int>(mWindow.height),
|
||||
0
|
||||
};
|
||||
NPEvent pluginEvent = {
|
||||
WM_WINDOWPOSCHANGED, 0,
|
||||
(LPARAM) &winpos
|
||||
(uintptr_t) &winpos
|
||||
};
|
||||
mPluginIface->event(&mData, &pluginEvent);
|
||||
}
|
||||
|
@ -1370,7 +1370,7 @@ PluginInstanceParent::UpdateScrollCapture(bool& aRequestNewCapture)
|
||||
container->SetCurrentImages(imageList);
|
||||
|
||||
// Invalidate our area in the page so the image gets flushed.
|
||||
NPRect nprect = {0, 0, targetSize.width, targetSize.height};
|
||||
NPRect nprect = {0, 0, static_cast<uint16_t>(targetSize.width), static_cast<uint16_t>(targetSize.height)};
|
||||
RecvNPN_InvalidateRect(nprect);
|
||||
|
||||
return true;
|
||||
|
@ -156,8 +156,8 @@ RadialGradientEffectD2D1::PrepareForRender(D2D1_CHANGE_TYPE changeType)
|
||||
PSConstantBuffer buffer = { { dc.x, dc.y, dr }, 0,
|
||||
{ mCenter1.x, mCenter1.y },
|
||||
A, mRadius1, mRadius1 * mRadius1,
|
||||
mStopCollection->GetExtendMode() != D2D1_EXTEND_MODE_CLAMP ? 1 : 0,
|
||||
mStopCollection->GetExtendMode() == D2D1_EXTEND_MODE_MIRROR ? 1 : 0,
|
||||
mStopCollection->GetExtendMode() != D2D1_EXTEND_MODE_CLAMP ? 1.0f : 0.0f,
|
||||
mStopCollection->GetExtendMode() == D2D1_EXTEND_MODE_MIRROR ? 1.0f : 0.0f,
|
||||
{ 0 }, { mat._11, mat._21, mat._31, 0,
|
||||
mat._12, mat._22, mat._32, 0 } };
|
||||
|
||||
|
@ -266,7 +266,7 @@ CompositorD3D9::DrawQuad(const gfx::Rect &aRect,
|
||||
d3d9Device->SetVertexShaderConstantF(CBmLayerTransform, &aTransform._11, 4);
|
||||
|
||||
IntPoint origin = mCurrentRT->GetOrigin();
|
||||
float renderTargetOffset[] = { origin.x, origin.y, 0, 0 };
|
||||
float renderTargetOffset[] = { static_cast<float>(origin.x), static_cast<float>(origin.y), 0, 0 };
|
||||
d3d9Device->SetVertexShaderConstantF(CBvRenderTargetOffset,
|
||||
renderTargetOffset,
|
||||
1);
|
||||
|
@ -325,7 +325,7 @@ GDIFontEntry::TestCharacterMap(uint32_t aCh)
|
||||
HFONT hfont = font->GetHFONT();
|
||||
HFONT oldFont = (HFONT)SelectObject(dc, hfont);
|
||||
|
||||
wchar_t str[1] = { aCh };
|
||||
wchar_t str[1] = { static_cast<wchar_t>(aCh) };
|
||||
WORD glyph[1];
|
||||
|
||||
bool hasGlyph = false;
|
||||
|
@ -3036,10 +3036,10 @@ nsSocketTransport::PRFileDescAutoLock::SetKeepaliveVals(bool aEnabled,
|
||||
#if defined(XP_WIN)
|
||||
// Windows allows idle time and retry interval to be set; NOT ping count.
|
||||
struct tcp_keepalive keepalive_vals = {
|
||||
(int)aEnabled,
|
||||
(u_long)aEnabled,
|
||||
// Windows uses msec.
|
||||
aIdleTime * 1000,
|
||||
aRetryInterval * 1000
|
||||
(u_long)aIdleTime * 1000,
|
||||
(u_long)aRetryInterval * 1000
|
||||
};
|
||||
DWORD bytes_returned;
|
||||
int err = WSAIoctl(sock, SIO_KEEPALIVE_VALS, &keepalive_vals,
|
||||
|
Loading…
Reference in New Issue
Block a user