For static functions not used as callbacks, there's no need to keep an unused parameter. * src/conf/domain_conf.c (virDomainChrDefParseTargetXML) (virDomainTimerDefParseXML, virDomainHostdevSubsysUsbDefParseXML) (virDomainVcpuPinDefParseXML): Drop unused parameter. (virDomainChrDefParseXML, virDomainDefParseXML) (virDomainHostdevDefParseXML): Update callers. (virDomainNetDefParseXML): Mark flags used. --- v2: new patch src/conf/domain_conf.c | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a680b11..6f20060 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2727,7 +2727,7 @@ virDomainNetDefParseXML(virCapsPtr caps, xmlNodePtr node, xmlXPathContextPtr ctxt, virBitmapPtr bootMap, - unsigned int flags ATTRIBUTE_UNUSED) + unsigned int flags) { virDomainNetDefPtr def; xmlNodePtr cur; @@ -3179,8 +3179,7 @@ out: static int virDomainChrDefParseTargetXML(virCapsPtr caps, virDomainChrDefPtr def, - xmlNodePtr cur, - unsigned int flags ATTRIBUTE_UNUSED) + xmlNodePtr cur) { int ret = -1; unsigned int port; @@ -3562,8 +3561,7 @@ virDomainChrDefParseXML(virCapsPtr caps, while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) { if (xmlStrEqual(cur->name, BAD_CAST "target")) { - if (virDomainChrDefParseTargetXML(caps, def, cur, - flags) < 0) { + if (virDomainChrDefParseTargetXML(caps, def, cur) < 0) { goto error; } } @@ -3819,8 +3817,7 @@ error: /* Parse the XML definition for a clock timer */ static virDomainTimerDefPtr virDomainTimerDefParseXML(const xmlNodePtr node, - xmlXPathContextPtr ctxt, - unsigned int flags ATTRIBUTE_UNUSED) + xmlXPathContextPtr ctxt) { char *name = NULL; char *present = NULL; @@ -4791,8 +4788,7 @@ error: static int virDomainHostdevSubsysUsbDefParseXML(const xmlNodePtr node, - virDomainHostdevDefPtr def, - unsigned int flags ATTRIBUTE_UNUSED) + virDomainHostdevDefPtr def) { int ret = -1; @@ -5012,7 +5008,7 @@ virDomainHostdevDefParseXML(const xmlNodePtr node, if (xmlStrEqual(cur->name, BAD_CAST "source")) { if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB) { - if (virDomainHostdevSubsysUsbDefParseXML(cur, def, flags) < 0) + if (virDomainHostdevSubsysUsbDefParseXML(cur, def) < 0) goto error; } if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && @@ -5730,8 +5726,7 @@ cleanup: static virDomainVcpuPinDefPtr virDomainVcpuPinDefParseXML(const xmlNodePtr node, xmlXPathContextPtr ctxt, - int maxvcpus, - unsigned int flags ATTRIBUTE_UNUSED) + int maxvcpus) { virDomainVcpuPinDefPtr def; xmlNodePtr oldnode = ctxt->node; @@ -5976,7 +5971,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, for (i = 0 ; i < n ; i++) { virDomainVcpuPinDefPtr vcpupin = NULL; - vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus, 0); + vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus); if (!vcpupin) goto error; @@ -6106,8 +6101,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps, goto no_memory; for (i = 0 ; i < n ; i++) { virDomainTimerDefPtr timer = virDomainTimerDefParseXML(nodes[i], - ctxt, - flags); + ctxt); if (!timer) goto error; -- 1.7.4.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list