mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
build: consistently use C99 varargs macros
Prior to this patch, there was an inconsistent mix between GNU and C99. For consistency, and potential portability to other compilers, stick with the C99 vararg macro syntax. * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/conf/domain_conf.c (virDomainReportError): Likewise. * src/conf/domain_event.c (eventReportError): Likewise. * src/conf/interface_conf.c (virInterfaceReportError): Likewise. * src/conf/network_conf.c (virNetworkReportError): Likewise. * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise. * src/conf/secret_conf.h (virSecretReportError): Likewise. * src/conf/storage_conf.h (virStorageReportError): Likewise. * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than GNU vararg macro syntax. * src/esx/esx_driver.c (ESX_ERROR): Likewise. * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise. * src/esx/esx_network_driver.c (ESX_ERROR): Likewise. * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise. * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise. * src/esx/esx_util.c (ESX_ERROR): Likewise. * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vmx.c (ESX_ERROR): Likewise. * src/util/hostusb.c (usbReportError): Use C99 rather than GNU vararg macro syntax. * src/util/json.c (virJSONError): Likewise. * src/util/macvtap.c (ReportError): Likewise. * src/util/pci.c (pciReportError): Likewise. * src/util/stats_linux.c (virStatsError): Likewise. * src/util/util.c (virUtilError): Likewise. * src/util/xml.c (virXMLError): Likewise. * src/xen/proxy_internal.c (virProxyError): Use C99 rather than GNU vararg macro syntax. * src/xen/sexpr.c (virSexprError): Likewise. * src/xen/xen_driver.c (xenUnifiedError): Likewise. * src/xen/xen_hypervisor.c (virXenError): Likewise. * src/xen/xen_inotify.c (virXenInotifyError): Likewise. * src/xen/xend_internal.c (virXendError): Likewise. * src/xen/xm_internal.c (xenXMError): Likewise. * src/xen/xs_internal.c (virXenStoreError): Likewise. * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/datatypes.c (virLibConnError): Likewise. * src/interface/netcf_driver.c (interfaceReportError): Likewise. * src/libvirt.c (virLibStreamError): Likewise. * src/lxc/lxc_conf.h (lxcError): Likewise. * src/network/bridge_driver.c (networkReportError): Likewise. * src/nodeinfo.c (nodeReportError): Likewise. * src/opennebula/one_conf.h (oneError): Likewise. * src/openvz/openvz_conf.h (openvzError): Likewise. * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise. * src/qemu/qemu_conf.h (qemuReportError): Likewise. * src/remote/remote_driver.c (errorf): Likewise. * src/security/security_driver.h (virSecurityReportError): Likewise. * src/test/test_driver.c (testError): Likewise. * src/uml/uml_conf.h (umlReportError): Likewise. * src/vbox/vbox_driver.c (vboxError): Likewise. * src/vbox/vbox_tmpl.c (vboxError): Likewise.
This commit is contained in:
committed by
Matthias Bolte
parent
4dbed7d9c4
commit
2e56fb2bcc
@@ -54,9 +54,9 @@ struct _usbDevice {
|
||||
/* For virReportOOMError() and virReportSystemError() */
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
#define usbReportError(code, fmt...) \
|
||||
#define usbReportError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
static int usbSysReadFile(const char *f_name, const char *d_name,
|
||||
int base, unsigned *value)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* json.c: JSON object parsing/formatting
|
||||
*
|
||||
* Copyright (C) 2009 Daniel P. Berrange
|
||||
* Copyright (C) 2009-2010 Red Hat, Inc.
|
||||
* Copyright (C) 2009 Daniel P. Berrange
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
/* XXX fixme */
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
#define virJSONError(code, fmt...) \
|
||||
#define virJSONError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
typedef struct _virJSONParserState virJSONParserState;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2010 Red Hat, Inc.
|
||||
* Copyright (C) 2010 IBM Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -48,9 +49,9 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NET
|
||||
|
||||
#define ReportError(conn, code, fmt...) \
|
||||
#define ReportError(conn, code, ...) \
|
||||
virReportErrorHelper(conn, VIR_FROM_NET, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
#define MACVTAP_NAME_PREFIX "macvtap"
|
||||
#define MACVTAP_NAME_PATTERN "macvtap%d"
|
||||
|
||||
@@ -75,9 +75,9 @@ struct _pciDeviceList {
|
||||
/* For virReportOOMError() and virReportSystemError() */
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
#define pciReportError(code, fmt...) \
|
||||
#define pciReportError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
/* Specifications referenced in comments:
|
||||
* PCI30 - PCI Local Bus Specification 3.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Linux block and network stats.
|
||||
*
|
||||
* Copyright (C) 2007-2009 Red Hat, Inc.
|
||||
* Copyright (C) 2007-2010 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_STATS_LINUX
|
||||
|
||||
#define virStatsError(code, fmt...) \
|
||||
#define virStatsError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_THIS, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
/*-------------------- interface stats --------------------*/
|
||||
|
||||
@@ -85,9 +85,9 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
#define virUtilError(code, fmt...) \
|
||||
#define virUtilError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
/* Like read(), but restarts after EINTR */
|
||||
int saferead(int fd, void *buf, size_t count)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* xml.c: XML based interfaces for the libvir library
|
||||
*
|
||||
* Copyright (C) 2005, 2007-2009 Red Hat, Inc.
|
||||
* Copyright (C) 2005, 2007-2010 Red Hat, Inc.
|
||||
*
|
||||
* See COPYING.LIB for the License of this software
|
||||
*
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_XML
|
||||
|
||||
#define virXMLError(code, fmt...) \
|
||||
#define virXMLError(code, ...) \
|
||||
virReportErrorHelper(NULL, VIR_FROM_XML, code, __FILE__, \
|
||||
__FUNCTION__, __LINE__, fmt)
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
/************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user