Coverity fix for libeval (CID #169327)
This commit is contained in:
parent
4a8a168079
commit
5d738dcb6d
|
@ -150,12 +150,12 @@ NumericEvaluator :: process(const char* s)
|
|||
bClParseFinished = false;
|
||||
|
||||
Token tok;
|
||||
numEval::TokenType parseTok;
|
||||
do {
|
||||
tok = getToken();
|
||||
parse(tok.token, tok.value);
|
||||
if (bClParseFinished || tok.token == ENDS) {
|
||||
numEval::Parse(pClParser, 0, parseTok, this);
|
||||
// Reset parser by passing zero as token ID, value is ignored.
|
||||
numEval::Parse(pClParser, 0, tok.value, this);
|
||||
break;
|
||||
}
|
||||
//usleep(200000);
|
||||
|
|
|
@ -114,7 +114,6 @@ public:
|
|||
void enableTextInputStorage(bool w) { bClTextInputStorage = w; }
|
||||
|
||||
/* Used by the lemon parser */
|
||||
void parse(int token, numEval::TokenType value);
|
||||
void parseError(const char* s);
|
||||
void parseOk();
|
||||
void parseSetResult(double);
|
||||
|
@ -162,6 +161,9 @@ protected:
|
|||
/* Tokenizer: Next token/value taken from input string. */
|
||||
Token getToken();
|
||||
|
||||
/* Used by processing loop */
|
||||
void parse(int token, numEval::TokenType value);
|
||||
|
||||
private:
|
||||
void* pClParser; // the current lemon parser state machine
|
||||
|
||||
|
|
Loading…
Reference in New Issue