case XML_FINISHED:
errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
+ default:
+ parsing = XML_PARSING;
}
- parsing = XML_PARSING;
if (len == 0) {
finalBuffer = (XML_Bool)isFinal;
case XML_INITIALIZED:
case XML_PARSING:
parsing = XML_FINISHED;
+ /* fall through */
+ default:
+ return XML_STATUS_OK;
}
- return XML_STATUS_OK;
}
eventEndPtr = eventPtr;
processor = errorProcessor;
XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
{
const char *start;
- enum XML_Error result;
+ enum XML_Error result = XML_STATUS_OK;
switch (parsing) {
case XML_SUSPENDED:
case XML_FINISHED:
errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
+ default:
+ parsing = XML_PARSING;
}
- parsing = XML_PARSING;
start = bufferPtr;
positionPtr = start;
break;
case XML_INITIALIZED:
case XML_PARSING:
- result = XML_STATUS_OK;
if (isFinal) {
parsing = XML_FINISHED;
return result;
}
+ default: ; /* should not happen */
}
}
case XML_FINISHED:
errorCode = XML_ERROR_FINISHED;
return NULL;
+ default: ;
}
+
if (len > bufferLim - bufferEnd) {
/* FIXME avoid integer overflow */
int neededSize = len + (bufferEnd - bufferPtr);
case XML_FINISHED:
errorCode = XML_ERROR_FINISHED;
return XML_STATUS_ERROR;
+ default:
+ parsing = resumable ? XML_SUSPENDED : XML_FINISHED;
}
- parsing = resumable ? XML_SUSPENDED : XML_FINISHED;
return XML_STATUS_OK;
}
enum XML_Status XMLCALL
XML_ResumeParser(XML_Parser parser)
{
- enum XML_Error result;
+ enum XML_Error result = XML_STATUS_OK;
if (parsing != XML_SUSPENDED) {
errorCode = XML_ERROR_NOT_SUSPENDED;
break;
case XML_INITIALIZED:
case XML_PARSING:
- result = XML_STATUS_OK;
if (finalBuffer) {
parsing = XML_FINISHED;
return result;
}
+ default: ;
}
}
return XML_ERROR_NONE;
case XML_FINISHED:
return XML_ERROR_ABORTED;
+ default:
+ start = next;
}
- start = next;
}
break;
case XML_TOK_PARTIAL:
return XML_ERROR_NONE;
case XML_FINISHED:
return XML_ERROR_ABORTED;
+ default: ;
}
}
/* not reached */
return XML_ERROR_NONE;
case XML_FINISHED:
return XML_ERROR_ABORTED;
+ default: ;
}
}
/* not reached */
return XML_ERROR_NONE;
case XML_FINISHED:
return XML_ERROR_ABORTED;
+ default:
+ *nextPtr = next;
}
- *nextPtr = next;
/* stop scanning for text declaration - we found one */
processor = entityValueProcessor;
return entityValueProcessor(parser, next, end, nextPtr);
return XML_ERROR_NONE;
case XML_FINISHED:
return XML_ERROR_ABORTED;
+ default:
+ s = next;
+ tok = XmlPrologTok(enc, s, end, &next);
}
-
- s = next;
- tok = XmlPrologTok(enc, s, end, &next);
}
/* not reached */
}
return XML_ERROR_NONE;
case XML_FINISHED:
return XML_ERROR_ABORTED;
+ default: ;
}
}
}
processInternalEntity(XML_Parser parser, ENTITY *entity)
{
const char *textStart, *textEnd;
- char *next;
+ const char *next;
enum XML_Error result;
OPEN_INTERNAL_ENTITY *openEntity;
{
ENTITY *entity;
const char *textStart, *textEnd;
- char *next;
+ const char *next;
int processorTagLevel;
enum XML_Error result;
OPEN_INTERNAL_ENTITY *openEntity = openInternalEntities;