1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 03:55:04 +03:00

clang-tidy: don't return in void functions

Found with readability-redundant-control-flow

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-06-08 12:27:45 -07:00 committed by Nick Wellnhofer
parent 4c3d22b059
commit 217e9b7af2
13 changed files with 0 additions and 48 deletions

1
list.c
View File

@ -643,7 +643,6 @@ xmlListSort(xmlListPtr l)
xmlListClear(l); xmlListClear(l);
xmlListMerge(l, lTemp); xmlListMerge(l, lTemp);
xmlListDelete(lTemp); xmlListDelete(lTemp);
return;
} }
/** /**

View File

@ -1154,7 +1154,6 @@ xmlAddDefAttrs(xmlParserCtxtPtr ctxt,
mem_error: mem_error:
xmlErrMemory(ctxt); xmlErrMemory(ctxt);
return;
} }
/** /**
@ -1185,7 +1184,6 @@ xmlAddSpecialAttr(xmlParserCtxtPtr ctxt,
mem_error: mem_error:
xmlErrMemory(ctxt); xmlErrMemory(ctxt);
return;
} }
/** /**
@ -1224,7 +1222,6 @@ xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt)
xmlHashFree(ctxt->attsSpecial, NULL); xmlHashFree(ctxt->attsSpecial, NULL);
ctxt->attsSpecial = NULL; ctxt->attsSpecial = NULL;
} }
return;
} }
/** /**
@ -3847,8 +3844,6 @@ xmlExpandPEsInEntityValue(xmlParserCtxtPtr ctxt, xmlSBuf *buf,
if (chunk < str) if (chunk < str)
xmlSBufAddString(buf, chunk, str - chunk); xmlSBufAddString(buf, chunk, str - chunk);
return;
} }
/** /**
@ -4203,8 +4198,6 @@ xmlExpandEntityInAttValue(xmlParserCtxtPtr ctxt, xmlSBuf *buf,
if (chunkSize > 0) if (chunkSize > 0)
xmlSBufAddString(buf, str - chunkSize, chunkSize); xmlSBufAddString(buf, str - chunkSize, chunkSize);
return;
} }
/** /**
@ -5176,7 +5169,6 @@ not_terminated:
xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, xmlFatalErrMsgStr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
"Comment not terminated\n", NULL); "Comment not terminated\n", NULL);
xmlFree(buf); xmlFree(buf);
return;
} }
/** /**
@ -5330,7 +5322,6 @@ get_more:
} }
} while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09) || (*in == 0x0a)); } while (((*in >= 0x20) && (*in <= 0x7F)) || (*in == 0x09) || (*in == 0x0a));
xmlParseCommentComplex(ctxt, buf, len, size); xmlParseCommentComplex(ctxt, buf, len, size);
return;
} }
@ -8546,7 +8537,6 @@ xmlParseEndTag1(xmlParserCtxtPtr ctxt, int line) {
namePop(ctxt); namePop(ctxt);
spacePop(ctxt); spacePop(ctxt);
return;
} }
/** /**

View File

@ -315,8 +315,6 @@ xmlCtxtVErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain,
if (ctxt->recovery == 0) if (ctxt->recovery == 0)
ctxt->disableSAX = 1; ctxt->disableSAX = 1;
} }
return;
} }
/** /**
@ -722,7 +720,6 @@ encoding_error:
ctxt->input->flags |= XML_INPUT_ENCODING_ERROR; ctxt->input->flags |= XML_INPUT_ENCODING_ERROR;
} }
ctxt->input->cur++; ctxt->input->cur++;
return;
} }
/** /**

View File

@ -1400,7 +1400,6 @@ error_unfinished:
ctxt->error = 1; ctxt->error = 1;
ERROR5(NULL, NULL, NULL, ERROR5(NULL, NULL, NULL,
"Unfinished expression '%s'.\n", ctxt->base); "Unfinished expression '%s'.\n", ctxt->base);
return;
} }
/************************************************************************ /************************************************************************

View File

@ -10674,7 +10674,6 @@ xmlRelaxNGCleanPSVI(xmlNodePtr node) {
} }
} while (cur != NULL); } while (cur != NULL);
} }
return;
} }
/************************************************************************ /************************************************************************
* * * *

View File

@ -951,7 +951,6 @@ xmlSchematronParseTestReportMsg(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr con)
xmlFree(select); xmlFree(select);
} }
child = child->next; child = child->next;
continue;
} }
} }

View File

@ -462,7 +462,6 @@ internalSubsetCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * SystemID ATTRIBUTE_UNUSED) const xmlChar * SystemID ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -478,7 +477,6 @@ externalSubsetCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * SystemID ATTRIBUTE_UNUSED) const xmlChar * SystemID ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -559,7 +557,6 @@ entityDeclCallback(void *ctx ATTRIBUTE_UNUSED,
xmlChar * content ATTRIBUTE_UNUSED) xmlChar * content ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -579,7 +576,6 @@ attributeDeclCallback(void *ctx ATTRIBUTE_UNUSED,
xmlEnumerationPtr tree ATTRIBUTE_UNUSED) xmlEnumerationPtr tree ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -598,7 +594,6 @@ elementDeclCallback(void *ctx ATTRIBUTE_UNUSED,
xmlElementContentPtr content ATTRIBUTE_UNUSED) xmlElementContentPtr content ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -617,7 +612,6 @@ notationDeclCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * systemId ATTRIBUTE_UNUSED) const xmlChar * systemId ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -638,7 +632,6 @@ unparsedEntityDeclCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * notationName ATTRIBUTE_UNUSED) const xmlChar * notationName ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -654,7 +647,6 @@ setDocumentLocatorCallback(void *ctx ATTRIBUTE_UNUSED,
xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED) xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -667,7 +659,6 @@ static void
startDocumentCallback(void *ctx ATTRIBUTE_UNUSED) startDocumentCallback(void *ctx ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -680,7 +671,6 @@ static void
endDocumentCallback(void *ctx ATTRIBUTE_UNUSED) endDocumentCallback(void *ctx ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
#if 0 #if 0
@ -731,7 +721,6 @@ charactersCallback(void *ctx ATTRIBUTE_UNUSED,
int len ATTRIBUTE_UNUSED) int len ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -746,7 +735,6 @@ referenceCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * name ATTRIBUTE_UNUSED) const xmlChar * name ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -765,7 +753,6 @@ ignorableWhitespaceCallback(void *ctx ATTRIBUTE_UNUSED,
int len ATTRIBUTE_UNUSED) int len ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -783,7 +770,6 @@ processingInstructionCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * data ATTRIBUTE_UNUSED) const xmlChar * data ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -800,7 +786,6 @@ cdataBlockCallback(void *ctx ATTRIBUTE_UNUSED,
int len ATTRIBUTE_UNUSED) int len ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -815,7 +800,6 @@ commentCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * value ATTRIBUTE_UNUSED) const xmlChar * value ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -832,7 +816,6 @@ warningCallback(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...) const char *msg ATTRIBUTE_UNUSED, ...)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -849,7 +832,6 @@ errorCallback(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED,
...) ...)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -865,7 +847,6 @@ static void
fatalErrorCallback(void *ctx ATTRIBUTE_UNUSED, fatalErrorCallback(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...) const char *msg ATTRIBUTE_UNUSED, ...)
{ {
return;
} }
@ -892,7 +873,6 @@ startElementNsCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar ** attributes ATTRIBUTE_UNUSED) const xmlChar ** attributes ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
/** /**
@ -909,7 +889,6 @@ endElementNsCallback(void *ctx ATTRIBUTE_UNUSED,
const xmlChar * URI ATTRIBUTE_UNUSED) const xmlChar * URI ATTRIBUTE_UNUSED)
{ {
callbacks++; callbacks++;
return;
} }
static xmlSAXHandler callbackSAX2HandlerStruct = { static xmlSAXHandler callbackSAX2HandlerStruct = {

View File

@ -6798,7 +6798,6 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree,
*/ */
static void xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED, static void xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...) { const char *msg ATTRIBUTE_UNUSED, ...) {
return;
} }
/** /**

View File

@ -225,8 +225,6 @@ xmlMemFree(void *ptr)
xmlMutexUnlock(&xmlMemMutex); xmlMutexUnlock(&xmlMemMutex);
free(p); free(p);
return;
} }
/** /**

View File

@ -3980,7 +3980,6 @@ rollback:
continue; continue;
progress: progress:
progress = 1; progress = 1;
continue;
} }
if (exec->status == XML_REGEXP_OK) { if (exec->status == XML_REGEXP_OK) {
return(exec->state->type == XML_REGEXP_FINAL_STATE); return(exec->state->type == XML_REGEXP_FINAL_STATE);
@ -4995,7 +4994,6 @@ xmlFAParseCharRange(xmlRegParserCtxtPtr ctxt) {
xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg, xmlRegAtomAddRange(ctxt, ctxt->atom, ctxt->neg,
XML_REGEXP_CHARVAL, start, end, NULL); XML_REGEXP_CHARVAL, start, end, NULL);
} }
return;
} }
/** /**

View File

@ -27343,7 +27343,6 @@ exit:
internal_error: internal_error:
vctxt->err = -1; vctxt->err = -1;
xmlStopParser(vctxt->parserCtxt); xmlStopParser(vctxt->parserCtxt);
return;
} }
static void static void
@ -27387,7 +27386,6 @@ exit:
internal_error: internal_error:
vctxt->err = -1; vctxt->err = -1;
xmlStopParser(vctxt->parserCtxt); xmlStopParser(vctxt->parserCtxt);
return;
} }
/************************************************************************ /************************************************************************

View File

@ -4552,7 +4552,6 @@ free_obj:
xmlXPathFreeNodeSet(obj->nodesetval); xmlXPathFreeNodeSet(obj->nodesetval);
xmlFree(obj); xmlFree(obj);
} }
return;
} }
@ -7459,7 +7458,6 @@ xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathPErrMemory(ctxt); xmlXPathPErrMemory(ctxt);
xmlFree(tokens); xmlFree(tokens);
valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt, ret)); valuePush(ctxt, xmlXPathCacheWrapNodeSet(ctxt, ret));
return;
} }
/** /**

View File

@ -110,7 +110,6 @@ xz_error(xz_statep state, int err, const char *msg)
strcpy(state->msg, state->path); strcpy(state->msg, state->path);
strcat(state->msg, ": "); strcat(state->msg, ": ");
strcat(state->msg, msg); strcat(state->msg, msg);
return;
} }
static void static void