MCPcopy Create free account
hub / github.com/Kitware/CMake / poolCopyStringN

Function poolCopyStringN

Utilities/cmexpat/lib/xmlparse.c:8031–8054  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8029}
8030
8031static const XML_Char *
8032poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n) {
8033 if (! pool->ptr && ! poolGrow(pool)) {
8034 /* The following line is unreachable given the current usage of
8035 * poolCopyStringN(). Currently it is called from exactly one
8036 * place to copy the text of a simple general entity. By that
8037 * point, the name of the entity is already stored in the pool, so
8038 * pool->ptr cannot be NULL.
8039 *
8040 * If poolCopyStringN() is used elsewhere as it well might be,
8041 * this line may well become executable again. Regardless, this
8042 * sort of check shouldn't be removed lightly, so we just exclude
8043 * it from the coverage statistics.
8044 */
8045 return NULL; /* LCOV_EXCL_LINE */
8046 }
8047 for (; n > 0; --n, s++) {
8048 if (! poolAppendChar(pool, *s))
8049 return NULL;
8050 }
8051 s = pool->start;
8052 poolFinish(pool);
8053 return s;
8054}
8055
8056static const XML_Char *FASTCALL
8057poolAppendString(STRING_POOL *pool, const XML_Char *s) {

Callers 1

copyEntityTableFunction · 0.85

Calls 1

poolGrowFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…