mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
conf: delete unused flags arguments
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.
This commit is contained in:
parent
c444721b9d
commit
553115d3ca
@ -2735,7 +2735,7 @@ virDomainNetDefParseXML(virCapsPtr caps,
|
|||||||
xmlNodePtr node,
|
xmlNodePtr node,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virBitmapPtr bootMap,
|
virBitmapPtr bootMap,
|
||||||
unsigned int flags ATTRIBUTE_UNUSED)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainNetDefPtr def;
|
virDomainNetDefPtr def;
|
||||||
xmlNodePtr cur;
|
xmlNodePtr cur;
|
||||||
@ -3187,8 +3187,7 @@ out:
|
|||||||
static int
|
static int
|
||||||
virDomainChrDefParseTargetXML(virCapsPtr caps,
|
virDomainChrDefParseTargetXML(virCapsPtr caps,
|
||||||
virDomainChrDefPtr def,
|
virDomainChrDefPtr def,
|
||||||
xmlNodePtr cur,
|
xmlNodePtr cur)
|
||||||
unsigned int flags ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
unsigned int port;
|
unsigned int port;
|
||||||
@ -3570,8 +3569,7 @@ virDomainChrDefParseXML(virCapsPtr caps,
|
|||||||
while (cur != NULL) {
|
while (cur != NULL) {
|
||||||
if (cur->type == XML_ELEMENT_NODE) {
|
if (cur->type == XML_ELEMENT_NODE) {
|
||||||
if (xmlStrEqual(cur->name, BAD_CAST "target")) {
|
if (xmlStrEqual(cur->name, BAD_CAST "target")) {
|
||||||
if (virDomainChrDefParseTargetXML(caps, def, cur,
|
if (virDomainChrDefParseTargetXML(caps, def, cur) < 0) {
|
||||||
flags) < 0) {
|
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3827,8 +3825,7 @@ error:
|
|||||||
/* Parse the XML definition for a clock timer */
|
/* Parse the XML definition for a clock timer */
|
||||||
static virDomainTimerDefPtr
|
static virDomainTimerDefPtr
|
||||||
virDomainTimerDefParseXML(const xmlNodePtr node,
|
virDomainTimerDefParseXML(const xmlNodePtr node,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt)
|
||||||
unsigned int flags ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
char *present = NULL;
|
char *present = NULL;
|
||||||
@ -4799,8 +4796,7 @@ error:
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainHostdevSubsysUsbDefParseXML(const xmlNodePtr node,
|
virDomainHostdevSubsysUsbDefParseXML(const xmlNodePtr node,
|
||||||
virDomainHostdevDefPtr def,
|
virDomainHostdevDefPtr def)
|
||||||
unsigned int flags ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -5020,7 +5016,7 @@ virDomainHostdevDefParseXML(const xmlNodePtr node,
|
|||||||
if (xmlStrEqual(cur->name, BAD_CAST "source")) {
|
if (xmlStrEqual(cur->name, BAD_CAST "source")) {
|
||||||
if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
|
if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
|
||||||
def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB) {
|
def->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB) {
|
||||||
if (virDomainHostdevSubsysUsbDefParseXML(cur, def, flags) < 0)
|
if (virDomainHostdevSubsysUsbDefParseXML(cur, def) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
|
if (def->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
|
||||||
@ -5755,8 +5751,7 @@ cleanup:
|
|||||||
static virDomainVcpuPinDefPtr
|
static virDomainVcpuPinDefPtr
|
||||||
virDomainVcpuPinDefParseXML(const xmlNodePtr node,
|
virDomainVcpuPinDefParseXML(const xmlNodePtr node,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
int maxvcpus,
|
int maxvcpus)
|
||||||
unsigned int flags ATTRIBUTE_UNUSED)
|
|
||||||
{
|
{
|
||||||
virDomainVcpuPinDefPtr def;
|
virDomainVcpuPinDefPtr def;
|
||||||
xmlNodePtr oldnode = ctxt->node;
|
xmlNodePtr oldnode = ctxt->node;
|
||||||
@ -6041,7 +6036,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
|||||||
|
|
||||||
for (i = 0 ; i < n ; i++) {
|
for (i = 0 ; i < n ; i++) {
|
||||||
virDomainVcpuPinDefPtr vcpupin = NULL;
|
virDomainVcpuPinDefPtr vcpupin = NULL;
|
||||||
vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus, 0);
|
vcpupin = virDomainVcpuPinDefParseXML(nodes[i], ctxt, def->maxvcpus);
|
||||||
|
|
||||||
if (!vcpupin)
|
if (!vcpupin)
|
||||||
goto error;
|
goto error;
|
||||||
@ -6171,8 +6166,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
|
|||||||
goto no_memory;
|
goto no_memory;
|
||||||
for (i = 0 ; i < n ; i++) {
|
for (i = 0 ; i < n ; i++) {
|
||||||
virDomainTimerDefPtr timer = virDomainTimerDefParseXML(nodes[i],
|
virDomainTimerDefPtr timer = virDomainTimerDefParseXML(nodes[i],
|
||||||
ctxt,
|
ctxt);
|
||||||
flags);
|
|
||||||
if (!timer)
|
if (!timer)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user