aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Voutilainen <ville.voutilainen@qt.io>2018-02-28 15:50:06 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-11-19 20:11:51 +0000
commit89cdd5575bba856035946926f5575705ebd6c1b7 (patch)
tree899363ee752070e0ee031e2bb29cb166aedf6c07
parent3793a264b6eeecae5d4c44747fbe46c0d255a3c5 (diff)
Silence a GCC 8 warning in qqmljsparser
qtdeclarative/src/qml/parser/qqmljsparser.cpp:82:129: error: ‘void* realloc(void*, size_t)’ moving an object of non-trivially copyable type ‘class QStringRef’; use ‘new’ and ‘delete’ instead [-Werror=class-memaccess] string_stack = reinterpret_cast<QStringRef*> (realloc(string_stack, stack_size * sizeof(QStringRef))); Change-Id: I670b8a860bf3dc9c20126306f7848f38acd75ca9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 2474eb092aace8f58bd49a61ec712b5ae4dd1245) Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-rw-r--r--src/qml/parser/qqmljsparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp
index 50518a92ee..99b5da2864 100644
--- a/src/qml/parser/qqmljsparser.cpp
+++ b/src/qml/parser/qqmljsparser.cpp
@@ -79,7 +79,7 @@ void Parser::reallocateStack()
sym_stack = reinterpret_cast<Value*> (realloc(sym_stack, stack_size * sizeof(Value)));
state_stack = reinterpret_cast<int*> (realloc(state_stack, stack_size * sizeof(int)));
location_stack = reinterpret_cast<AST::SourceLocation*> (realloc(location_stack, stack_size * sizeof(AST::SourceLocation)));
- string_stack = reinterpret_cast<QStringRef*> (realloc(string_stack, stack_size * sizeof(QStringRef)));
+ string_stack = reinterpret_cast<QStringRef*> (realloc(static_cast<void *>(string_stack), stack_size * sizeof(QStringRef)));
}
Parser::Parser(Engine *engine):