From 092b2d6ea0337ce8313cecb8cac43ff53e9d094d Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Sun, 22 Jan 2017 23:21:05 +0100 Subject: [PATCH 1/2] - Fixed Clang compile error [-Wnon-pod-varargs]. --- src/scripting/zscript/zcc_compile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 365a29abb..41c58dc1c 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -2022,7 +2022,7 @@ void ZCCCompiler::DispatchScriptProperty(PProperty *prop, ZCC_PropertyStmt *prop else if (!ex->isConstant()) { // If we get TypeError, there has already been a message from deeper down so do not print another one. - if (exp->Type != TypeError) Error(exp, "%s: non-constant parameter", prop->SymbolName); + if (exp->Type != TypeError) Error(exp, "%s: non-constant parameter", prop->SymbolName.GetChars()); return; } @@ -2052,7 +2052,7 @@ void ZCCCompiler::DispatchScriptProperty(PProperty *prop, ZCC_PropertyStmt *prop } else if (!cls->IsDescendantOf(static_cast(f->Type)->ClassRestriction)) { - Error(property, "class %s is not compatible with property type %s", clsname, static_cast(f->Type)->ClassRestriction->TypeName.GetChars()); + Error(property, "class %s is not compatible with property type %s", clsname.GetChars(), static_cast(f->Type)->ClassRestriction->TypeName.GetChars()); } *(PClass**)addr = cls; } From 4694f9b20112b8100351d46622d8c82c28aebb95 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Mon, 23 Jan 2017 00:22:25 +0100 Subject: [PATCH 2/2] - Fixed GCC/Clang 'extra qualification' error. --- src/scripting/zscript/zcc_compile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/zscript/zcc_compile.h b/src/scripting/zscript/zcc_compile.h index 2b9671cdc..bda57e7b4 100644 --- a/src/scripting/zscript/zcc_compile.h +++ b/src/scripting/zscript/zcc_compile.h @@ -88,7 +88,7 @@ public: int Compile(); private: - int ZCCCompiler::IntConstFromNode(ZCC_TreeNode *node, PStruct *cls); + int IntConstFromNode(ZCC_TreeNode *node, PStruct *cls); void ProcessClass(ZCC_Class *node, PSymbolTreeNode *tnode); void ProcessStruct(ZCC_Struct *node, PSymbolTreeNode *tnode, ZCC_Class *outer); void CreateStructTypes();