mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-23 15:09:24 -05:00
utils/cert-expr.c: remove 'lasttoktext' field.
Coverity spotted me copying an uninitialised variable into it, which made me wonder how I hadn't noticed. The answer is that nothing actually _uses_ that variable - it's written, but never read. I must have put it in during development, thinking I was going to need it for something, and then didn't end up using it after all.
This commit is contained in:
parent
3442fb1aeb
commit
ebaa37e159
@ -347,7 +347,7 @@ typedef struct ParserState ParserState;
|
|||||||
struct ParserState {
|
struct ParserState {
|
||||||
ptrlen currtext;
|
ptrlen currtext;
|
||||||
Token tok;
|
Token tok;
|
||||||
ptrlen toktext, lasttoktext;
|
ptrlen toktext;
|
||||||
char *err;
|
char *err;
|
||||||
ptrlen errloc;
|
ptrlen errloc;
|
||||||
};
|
};
|
||||||
@ -365,7 +365,6 @@ static void error(ParserState *ps, char *errtext, ptrlen errloc)
|
|||||||
static void advance(ParserState *ps)
|
static void advance(ParserState *ps)
|
||||||
{
|
{
|
||||||
char *err = NULL;
|
char *err = NULL;
|
||||||
ps->lasttoktext = ps->toktext;
|
|
||||||
ps->tok = lex(&ps->currtext, &ps->toktext, &err);
|
ps->tok = lex(&ps->currtext, &ps->toktext, &err);
|
||||||
if (ps->tok == TOK_ERROR)
|
if (ps->tok == TOK_ERROR)
|
||||||
error(ps, err, ps->toktext);
|
error(ps, err, ps->toktext);
|
||||||
@ -542,7 +541,6 @@ static ExprNode *parse(ptrlen expr, char **error_msg, ptrlen *error_loc)
|
|||||||
{
|
{
|
||||||
ParserState ps[1];
|
ParserState ps[1];
|
||||||
ps->currtext = expr;
|
ps->currtext = expr;
|
||||||
ps->lasttoktext = make_ptrlen(ps->currtext.ptr, 0);
|
|
||||||
ps->err = NULL;
|
ps->err = NULL;
|
||||||
advance(ps);
|
advance(ps);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user