]> granicus.if.org Git - libexpat/commitdiff
xmlparse.c|xmlrole.c: Fix compiler warning "unused parameter" with -DEXPAT_DTD=OFF
authorSebastian Pipping <sebastian@pipping.org>
Sun, 29 Sep 2019 17:25:54 +0000 (19:25 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Sun, 29 Sep 2019 17:34:39 +0000 (19:34 +0200)
expat/lib/xmlparse.c
expat/lib/xmlrole.c

index 1ba485308df9147e7bdc70dda14278fe8ee989a4..829e2b35abff6ff9d9a86b8759ab8a8dc037893c 100644 (file)
@@ -1401,6 +1401,7 @@ XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) {
   parser->m_useForeignDTD = useDTD;
   return XML_ERROR_NONE;
 #else
+  UNUSED_P(useDTD);
   return XML_ERROR_FEATURE_REQUIRES_XML_DTD;
 #endif
 }
index 4d3e3e86e9e864dd64f9f184c9467b05659d299e..3b676a415d87ab2fb36793d940f7cc615b0b4ebe 100644 (file)
@@ -1220,6 +1220,8 @@ common(PROLOG_STATE *state, int tok) {
 #ifdef XML_DTD
   if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
     return XML_ROLE_INNER_PARAM_ENTITY_REF;
+#else
+  UNUSED_P(tok);
 #endif
   state->handler = error;
   return XML_ROLE_ERROR;