void-packages/srcpkgs/qt/patches/fix-bytecompiler_narrowing....

23 lines
1.4 KiB
Diff

Fix gcc6 -Wnarrowing errors by casting to uint32_t
--- a/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h 2015-05-07 16:14:47.000000000 +0200
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.h 2016-09-11 22:26:00.614829051 +0200
@@ -176,7 +176,7 @@
// Node::emitCode assumes that dst, if provided, is either a local or a referenced temporary.
ASSERT(!dst || dst == ignoredResult() || !dst->isTemporary() || dst->refCount());
if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) {
- LineInfo info = { instructions().size(), n->lineNo() };
+ LineInfo info = { (uint32_t)instructions().size(), n->lineNo() };
m_codeBlock->addLineInfo(info);
}
if (m_emitNodeDepth >= s_maxEmitNodeDepth)
@@ -195,7 +195,7 @@
void emitNodeInConditionContext(ExpressionNode* n, Label* trueTarget, Label* falseTarget, bool fallThroughMeansTrue)
{
if (!m_codeBlock->numberOfLineInfos() || m_codeBlock->lastLineInfo().lineNumber != n->lineNo()) {
- LineInfo info = { instructions().size(), n->lineNo() };
+ LineInfo info = { (uint32_t)instructions().size(), n->lineNo() };
m_codeBlock->addLineInfo(info);
}
if (m_emitNodeDepth >= s_maxEmitNodeDepth)