mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-18 02:55:43 +00:00
Comment why doIgnoreSection is believed to always use the parser's encoding
Also add comment tags so that lcov can ignore the unreachable code
This commit is contained in:
parent
5214e4427a
commit
860933367a
1 changed files with 12 additions and 0 deletions
|
@ -3825,8 +3825,20 @@ doIgnoreSection(XML_Parser parser,
|
|||
eventEndPP = &eventEndPtr;
|
||||
}
|
||||
else {
|
||||
/* It's not entirely clear, but it seems the following two lines
|
||||
* of code cannot be executed. The only occasions on which 'enc'
|
||||
* is not 'parser->m_encoding' are when this function is called
|
||||
* from the internal entity processing, and IGNORE sections are an
|
||||
* error in internal entities.
|
||||
*
|
||||
* Since it really isn't clear that this is true, we keep the code
|
||||
* and just remove it from our coverage tests.
|
||||
*
|
||||
* LCOV_EXCL_START
|
||||
*/
|
||||
eventPP = &(openInternalEntities->internalEventPtr);
|
||||
eventEndPP = &(openInternalEntities->internalEventEndPtr);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
*eventPP = s;
|
||||
*startPtr = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue