From 5fb89e7b3afa1c314b34834fe729cd063f65a4d4 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 21 Oct 2024 01:46:11 +0200 Subject: [PATCH] lib: Be explicit about XML_PARSING in XML_StopParser --- expat/lib/xmlparse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index fa02537f..983f6df0 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -2247,7 +2247,7 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable) { case XML_FINISHED: parser->m_errorCode = XML_ERROR_FINISHED; return XML_STATUS_ERROR; - default: + case XML_PARSING: if (resumable) { #ifdef XML_DTD if (parser->m_isParamEntity) { @@ -2258,6 +2258,9 @@ XML_StopParser(XML_Parser parser, XML_Bool resumable) { parser->m_parsingStatus.parsing = XML_SUSPENDED; } else parser->m_parsingStatus.parsing = XML_FINISHED; + break; + default: + assert(0); } return XML_STATUS_OK; }