From 288f01a0c2f43e03a7e9fed5588dadac1a97ea57 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 20 Mar 2016 11:34:41 -0500 Subject: [PATCH] GCC fixes for zcc_compile.(cpp|h) --- src/zscript/zcc_compile.cpp | 1 + src/zscript/zcc_compile.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/zscript/zcc_compile.cpp b/src/zscript/zcc_compile.cpp index 037e4fa42a..b7bfe81ba1 100644 --- a/src/zscript/zcc_compile.cpp +++ b/src/zscript/zcc_compile.cpp @@ -39,6 +39,7 @@ ZCCCompiler::ZCCCompiler(ZCC_AST &ast, DObject *_outer, PSymbolTable &_symbols) case AST_Class: Classes.Push(static_cast(node)); break; case AST_Struct: Structs.Push(static_cast(node)); break; case AST_ConstantDef: Constants.Push(static_cast(node)); break; + default: assert(0 && "Default case is just here to make GCC happy. It should never be reached"); } } break; diff --git a/src/zscript/zcc_compile.h b/src/zscript/zcc_compile.h index 7f1f71c93c..d034464b77 100644 --- a/src/zscript/zcc_compile.h +++ b/src/zscript/zcc_compile.h @@ -37,7 +37,7 @@ private: ZCC_Expression *NodeFromSymbol(PSymbol *sym, ZCC_Expression *source, PSymbolTable *table); ZCC_ExprConstant *NodeFromSymbolConst(PSymbolConst *sym, ZCC_Expression *idnode); ZCC_ExprTypeRef *NodeFromSymbolType(PSymbolType *sym, ZCC_Expression *idnode); - PSymbol *ZCCCompiler::CompileNode(ZCC_NamedNode *node); + PSymbol *CompileNode(ZCC_NamedNode *node); void Warn(ZCC_TreeNode *node, const char *msg, ...);