diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2021-04-20 14:01:27 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2021-04-30 23:32:26 +0200 |
commit | 4eadfd09d459d21071ea7c39c0f406ce64813eb7 (patch) | |
tree | 19674da38270dfd95333cae59e02629ece7ebb36 | |
parent | 620dee96b8ea10175898dcdb76d88aeb6a2db6fc (diff) | |
download | libexpat-git-4eadfd09d459d21071ea7c39c0f406ce64813eb7.tar.gz |
lib: Address Cppcheck 2.4.1 warning "uninitvar"
-rw-r--r-- | expat/lib/xmlparse.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 3bb3b217..fd69b3b1 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -5558,7 +5558,8 @@ appendAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, #endif for (;;) { - const char *next; + const char *next + = ptr; /* XmlAttributeValueTok doesn't always set the last arg */ int tok = XmlAttributeValueTok(enc, ptr, end, &next); #ifdef XML_DTD if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) { @@ -5769,7 +5770,8 @@ storeEntityValue(XML_Parser parser, const ENCODING *enc, } for (;;) { - const char *next; + const char *next + = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */ int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next); #ifdef XML_DTD |