Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2022-09-07 16:23:36 +0300
committerSimon Tatham <anakin@pobox.com>2022-09-07 16:47:54 +0300
commitebaa37e1590e77644aa5d0c9a85506f18b9bf38b (patch)
treeb1259266eb27849b070ccc19de0a502fdf0b9ed0 /utils
parent3442fb1aeba03778478f9ef1a4406ab7bb2777f4 (diff)
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.
Diffstat (limited to 'utils')
-rw-r--r--utils/cert-expr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/utils/cert-expr.c b/utils/cert-expr.c
index 8fe8df7c..880239e4 100644
--- a/utils/cert-expr.c
+++ b/utils/cert-expr.c
@@ -347,7 +347,7 @@ typedef struct ParserState ParserState;
struct ParserState {
ptrlen currtext;
Token tok;
- ptrlen toktext, lasttoktext;
+ ptrlen toktext;
char *err;
ptrlen errloc;
};
@@ -365,7 +365,6 @@ static void error(ParserState *ps, char *errtext, ptrlen errloc)
static void advance(ParserState *ps)
{
char *err = NULL;
- ps->lasttoktext = ps->toktext;
ps->tok = lex(&ps->currtext, &ps->toktext, &err);
if (ps->tok == TOK_ERROR)
error(ps, err, ps->toktext);
@@ -542,7 +541,6 @@ static ExprNode *parse(ptrlen expr, char **error_msg, ptrlen *error_loc)
{
ParserState ps[1];
ps->currtext = expr;
- ps->lasttoktext = make_ptrlen(ps->currtext.ptr, 0);
ps->err = NULL;
advance(ps);