diff options
author | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-02-28 15:50:06 +0200 |
---|---|---|
committer | Ville Voutilainen <ville.voutilainen@qt.io> | 2018-02-28 16:10:48 +0000 |
commit | 2474eb092aace8f58bd49a61ec712b5ae4dd1245 (patch) | |
tree | f855b80afe96e86a3da6f4dc2dbd7afa535b9be6 /src/qml/parser | |
parent | 520c26b82182e9dfe29e4993c74c8c7225c66aa0 (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>
Diffstat (limited to 'src/qml/parser')
-rw-r--r-- | src/qml/parser/qqmljsparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/parser/qqmljsparser.cpp b/src/qml/parser/qqmljsparser.cpp index f1beec6387..24b04b02f9 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): |