diff --git a/DDParsers/include/Evaluator/Evaluator.h b/DDParsers/include/Evaluator/Evaluator.h index 538c629a4c07bc320264ed8dfc285a52571f6e68..c8a331fa8ec75e398a65db20e7dbcf7921d7c1e1 100644 --- a/DDParsers/include/Evaluator/Evaluator.h +++ b/DDParsers/include/Evaluator/Evaluator.h @@ -14,6 +14,7 @@ /// C/C++ include files #include <ostream> +#include <string> /// Namespace for the AIDA detector description toolkit namespace dd4hep { diff --git a/DDParsers/src/Evaluator/Evaluator.cpp b/DDParsers/src/Evaluator/Evaluator.cpp index 51c1a5df1590bc1613441ea73aaa918bc8ed4ef3..eb2619f83cd5c9ac2080db86c812dd99c57e291c 100644 --- a/DDParsers/src/Evaluator/Evaluator.cpp +++ b/DDParsers/src/Evaluator/Evaluator.cpp @@ -23,8 +23,8 @@ using namespace std; // Disable some diagnostics, which we know, but need to ignore #if defined(__GNUC__) && !defined(__APPLE__) && !defined(__llvm__) /* This is OK: - ../DDCore/src/Evaluator/Evaluator.cpp: In function 'int engine(pchar, pchar, double&, char*&, const dic_type&)': - ../DDCore/src/Evaluator/Evaluator.cpp:164:23: warning: 'pp[3]' may be used uninitialized in this function [-Wmaybe-uninitialized] + ../DDCore/src/Evaluator/Evaluator.cpp: In execute_function 'int engine(pchar, pchar, double&, char*&, const dic_type&)': + ../DDCore/src/Evaluator/Evaluator.cpp:164:23: warning: 'pp[3]' may be used uninitialized in this execute_function [-Wmaybe-uninitialized] result = (*fcn.f4)(pp[3],pp[2],pp[1],pp[0]); .... */ @@ -186,11 +186,11 @@ static int variable(const string & name, double & result, } } -static int function(const string & name, stack<double> & par, +static int execute_function(const string & name, stack<double> & par, double & result, const dic_type & dictionary) /*********************************************************************** * * - * Name: function Date: 03.10.00 * + * Name: execute_function Date: 03.10.00 * * Author: Evgeni Chernyaev Revised: * * * * Function: Finds value of the function. * @@ -344,7 +344,7 @@ static int operand(char const* begin, char const* end, double & result, default: EVAL_EXIT( EVAL_STATUS, par_end ); } - EVAL_STATUS = function(name, par, result, dictionary); + EVAL_STATUS = execute_function(name, par, result, dictionary); EVAL_EXIT( EVAL_STATUS, (EVAL_STATUS == EVAL::OK) ? pointer : begin); } }