summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-05-13 17:53:17 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-05-13 17:53:17 +0000
commit001faf3269541f0231482e0fccc846f62f8930b2 (patch)
treea5a7b0143f3fd9d71e42eb03c4967f8763ec3501 /hw
parent4cfce484c5d7e514c23689f3194055b5463d6054 (diff)
Replace gcc variadic macro extension with C99 version
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/adb.c6
-rw-r--r--hw/apb_pci.c6
-rw-r--r--hw/arm_gic.c6
-rw-r--r--hw/cs4231.c6
-rw-r--r--hw/cuda.c6
-rw-r--r--hw/dp8393x.c10
-rw-r--r--hw/eccmemctl.c6
-rw-r--r--hw/eepro100.c4
-rw-r--r--hw/eeprom93xx.c4
-rw-r--r--hw/escc.c18
-rw-r--r--hw/esp.c10
-rw-r--r--hw/fdc.c10
-rw-r--r--hw/fw_cfg.c6
-rw-r--r--hw/g364fb.c10
-rw-r--r--hw/grackle_pci.c6
-rw-r--r--hw/heathrow_pic.c6
-rw-r--r--hw/iommu.c6
-rw-r--r--hw/lsi53c895a.c14
-rw-r--r--hw/m48t59.c4
-rw-r--r--hw/mac_dbdma.c6
-rw-r--r--hw/mac_nvram.c6
-rw-r--r--hw/mcf_fec.c6
-rw-r--r--hw/mips_malta.c4
-rw-r--r--hw/openpic.c4
-rw-r--r--hw/parallel.c4
-rw-r--r--hw/pci_host.h6
-rw-r--r--hw/pflash_cfi01.c10
-rw-r--r--hw/pflash_cfi02.c6
-rw-r--r--hw/pl022.c14
-rw-r--r--hw/pl031.c6
-rw-r--r--hw/pl061.c14
-rw-r--r--hw/pl181.c6
-rw-r--r--hw/ppc4xx_pci.c2
-rw-r--r--hw/ppc_newworld.c6
-rw-r--r--hw/ppc_prep.c10
-rw-r--r--hw/ppce500_pci.c4
-rw-r--r--hw/rc4030.c10
-rw-r--r--hw/sbi.c6
-rw-r--r--hw/scsi-disk.c10
-rw-r--r--hw/scsi-generic.c10
-rw-r--r--hw/sd.c6
-rw-r--r--hw/sh_intc.h2
-rw-r--r--hw/slavio_intctl.c6
-rw-r--r--hw/slavio_misc.c6
-rw-r--r--hw/slavio_timer.c6
-rw-r--r--hw/sm501.c4
-rw-r--r--hw/smbus.c14
-rw-r--r--hw/sparc32_dma.c6
-rw-r--r--hw/ssd0303.c14
-rw-r--r--hw/ssd0323.c14
-rw-r--r--hw/ssi-sd.c14
-rw-r--r--hw/stellaris_enet.c14
-rw-r--r--hw/sun4c_intctl.c6
-rw-r--r--hw/sun4m.c6
-rw-r--r--hw/sun4u.c6
-rw-r--r--hw/unin_pci.c6
-rw-r--r--hw/usb-msd.c6
-rw-r--r--hw/usb-serial.c6
58 files changed, 218 insertions, 218 deletions
diff --git a/hw/adb.c b/hw/adb.c
index 61a3cdf21..c57aeaac4 100644
--- a/hw/adb.c
+++ b/hw/adb.c
@@ -29,10 +29,10 @@
//#define DEBUG_ADB
#ifdef DEBUG_ADB
-#define ADB_DPRINTF(fmt, args...) \
-do { printf("ADB: " fmt , ##args); } while (0)
+#define ADB_DPRINTF(fmt, ...) \
+do { printf("ADB: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define ADB_DPRINTF(fmt, args...)
+#define ADB_DPRINTF(fmt, ...)
#endif
/* ADB commands */
diff --git a/hw/apb_pci.c b/hw/apb_pci.c
index 36ecb5584..d6ce9f4ae 100644
--- a/hw/apb_pci.c
+++ b/hw/apb_pci.c
@@ -33,10 +33,10 @@
//#define DEBUG_APB
#ifdef DEBUG_APB
-#define APB_DPRINTF(fmt, args...) \
-do { printf("APB: " fmt , ##args); } while (0)
+#define APB_DPRINTF(fmt, ...) \
+do { printf("APB: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define APB_DPRINTF(fmt, args...)
+#define APB_DPRINTF(fmt, ...)
#endif
typedef target_phys_addr_t pci_addr_t;
diff --git a/hw/arm_gic.c b/hw/arm_gic.c
index 2f484e191..cb774d6e2 100644
--- a/hw/arm_gic.c
+++ b/hw/arm_gic.c
@@ -14,10 +14,10 @@
//#define DEBUG_GIC
#ifdef DEBUG_GIC
-#define DPRINTF(fmt, args...) \
-do { printf("arm_gic: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("arm_gic: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
#ifdef NVIC
diff --git a/hw/cs4231.c b/hw/cs4231.c
index 59d83e01b..22669806d 100644
--- a/hw/cs4231.c
+++ b/hw/cs4231.c
@@ -46,10 +46,10 @@ typedef struct CSState {
#define CS_CDC_VER 0x8a
#ifdef DEBUG_CS
-#define DPRINTF(fmt, args...) \
- do { printf("CS: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("CS: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
static void cs_reset(void *opaque)
diff --git a/hw/cuda.c b/hw/cuda.c
index 095635481..145aa9c2a 100644
--- a/hw/cuda.c
+++ b/hw/cuda.c
@@ -36,10 +36,10 @@
//#define DEBUG_CUDA_PACKET
#ifdef DEBUG_CUDA
-#define CUDA_DPRINTF(fmt, args...) \
-do { printf("CUDA: " fmt , ##args); } while (0)
+#define CUDA_DPRINTF(fmt, ...) \
+ do { printf("CUDA: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define CUDA_DPRINTF(fmt, args...)
+#define CUDA_DPRINTF(fmt, ...)
#endif
/* Bits in B data register: all active low */
diff --git a/hw/dp8393x.c b/hw/dp8393x.c
index 6170588e9..44184097e 100644
--- a/hw/dp8393x.c
+++ b/hw/dp8393x.c
@@ -34,8 +34,8 @@
#endif
#ifdef DEBUG_SONIC
-#define DPRINTF(fmt, args...) \
-do { printf("sonic: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("sonic: " fmt , ## __VA_ARGS__); } while (0)
static const char* reg_names[] = {
"CR", "DCR", "RCR", "TCR", "IMR", "ISR", "UTDA", "CTDA",
"TPS", "TFC", "TSA0", "TSA1", "TFS", "URDA", "CRDA", "CRBA0",
@@ -46,11 +46,11 @@ static const char* reg_names[] = {
"0x30", "0x31", "0x32", "0x33", "0x34", "0x35", "0x36", "0x37",
"0x38", "0x39", "0x3a", "0x3b", "0x3c", "0x3d", "0x3e", "DCR2" };
#else
-#define DPRINTF(fmt, args...) do {} while (0)
+#define DPRINTF(fmt, ...) do {} while (0)
#endif
-#define SONIC_ERROR(fmt, args...) \
-do { printf("sonic ERROR: %s: " fmt, __func__ , ##args); } while (0)
+#define SONIC_ERROR(fmt, ...) \
+do { printf("sonic ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
#define SONIC_CR 0x00
#define SONIC_DCR 0x01
diff --git a/hw/eccmemctl.c b/hw/eccmemctl.c
index 28519c81f..07f5ef76f 100644
--- a/hw/eccmemctl.c
+++ b/hw/eccmemctl.c
@@ -28,10 +28,10 @@
//#define DEBUG_ECC
#ifdef DEBUG_ECC
-#define DPRINTF(fmt, args...) \
- do { printf("ECC: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("ECC: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
/* There are 3 versions of this chip used in SMP sun4m systems:
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 235e59872..7dbbca009 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -60,9 +60,9 @@
//~ #define DEBUG_EEPRO100
#ifdef DEBUG_EEPRO100
-#define logout(fmt, args...) fprintf(stderr, "EE100\t%-24s" fmt, __func__, ##args)
+#define logout(fmt, ...) fprintf(stderr, "EE100\t%-24s" fmt, __func__, ## __VA_ARGS__)
#else
-#define logout(fmt, args...) ((void)0)
+#define logout(fmt, ...) ((void)0)
#endif
/* Set flags to 0 to disable debug output. */
diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c
index ae15a7f63..e4b6b13b7 100644
--- a/hw/eeprom93xx.c
+++ b/hw/eeprom93xx.c
@@ -44,9 +44,9 @@
//~ #define DEBUG_EEPROM
#ifdef DEBUG_EEPROM
-#define logout(fmt, args...) fprintf(stderr, "EEPROM\t%-24s" fmt, __func__, ##args)
+#define logout(fmt, ...) fprintf(stderr, "EEPROM\t%-24s" fmt, __func__, ## __VA_ARGS__)
#else
-#define logout(fmt, args...) ((void)0)
+#define logout(fmt, ...) ((void)0)
#endif
#define EEPROM_INSTANCE 0
diff --git a/hw/escc.c b/hw/escc.c
index 4c299ff6e..53808e584 100644
--- a/hw/escc.c
+++ b/hw/escc.c
@@ -62,22 +62,22 @@
*/
#ifdef DEBUG_SERIAL
-#define SER_DPRINTF(fmt, args...) \
-do { printf("SER: " fmt , ##args); } while (0)
+#define SER_DPRINTF(fmt, ...) \
+ do { printf("SER: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define SER_DPRINTF(fmt, args...)
+#define SER_DPRINTF(fmt, ...)
#endif
#ifdef DEBUG_KBD
-#define KBD_DPRINTF(fmt, args...) \
-do { printf("KBD: " fmt , ##args); } while (0)
+#define KBD_DPRINTF(fmt, ...) \
+ do { printf("KBD: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define KBD_DPRINTF(fmt, args...)
+#define KBD_DPRINTF(fmt, ...)
#endif
#ifdef DEBUG_MOUSE
-#define MS_DPRINTF(fmt, args...) \
-do { printf("MSC: " fmt , ##args); } while (0)
+#define MS_DPRINTF(fmt, ...) \
+ do { printf("MSC: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define MS_DPRINTF(fmt, args...)
+#define MS_DPRINTF(fmt, ...)
#endif
typedef enum {
diff --git a/hw/esp.c b/hw/esp.c
index aa1a76eab..17b8f9635 100644
--- a/hw/esp.c
+++ b/hw/esp.c
@@ -38,14 +38,14 @@
*/
#ifdef DEBUG_ESP
-#define DPRINTF(fmt, args...) \
-do { printf("ESP: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("ESP: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while (0)
+#define DPRINTF(fmt, ...) do {} while (0)
#endif
-#define ESP_ERROR(fmt, args...) \
-do { printf("ESP ERROR: %s: " fmt, __func__ , ##args); } while (0)
+#define ESP_ERROR(fmt, ...) \
+ do { printf("ESP ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
#define ESP_REGS 16
#define TI_BUFSZ 16
diff --git a/hw/fdc.c b/hw/fdc.c
index b00a4ecec..f4a4be017 100644
--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -37,14 +37,14 @@
//#define DEBUG_FLOPPY
#ifdef DEBUG_FLOPPY
-#define FLOPPY_DPRINTF(fmt, args...) \
-do { printf("FLOPPY: " fmt , ##args); } while (0)
+#define FLOPPY_DPRINTF(fmt, ...) \
+ do { printf("FLOPPY: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define FLOPPY_DPRINTF(fmt, args...)
+#define FLOPPY_DPRINTF(fmt, ...)
#endif
-#define FLOPPY_ERROR(fmt, args...) \
-do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ##args); } while (0)
+#define FLOPPY_ERROR(fmt, ...) \
+ do { printf("FLOPPY ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
/********************************************************/
/* Floppy drive emulation */
diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c
index e1b19d72e..39bd95590 100644
--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
@@ -30,10 +30,10 @@
//#define DEBUG_FW_CFG
#ifdef DEBUG_FW_CFG
-#define FW_CFG_DPRINTF(fmt, args...) \
- do { printf("FW_CFG: " fmt , ##args); } while (0)
+#define FW_CFG_DPRINTF(fmt, ...) \
+ do { printf("FW_CFG: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define FW_CFG_DPRINTF(fmt, args...)
+#define FW_CFG_DPRINTF(fmt, ...)
#endif
#define FW_CFG_SIZE 2
diff --git a/hw/g364fb.c b/hw/g364fb.c
index 6d37ca128..54c201c85 100644
--- a/hw/g364fb.c
+++ b/hw/g364fb.c
@@ -26,13 +26,13 @@
//#define DEBUG_G364
#ifdef DEBUG_G364
-#define DPRINTF(fmt, args...) \
-do { printf("g364: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("g364: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while (0)
+#define DPRINTF(fmt, ...) do {} while (0)
#endif
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "g364 ERROR: " fmt , ##args);} while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "g364 ERROR: " fmt , ## __VA_ARGS__);} while (0)
typedef struct G364State {
/* hardware */
diff --git a/hw/grackle_pci.c b/hw/grackle_pci.c
index 61606b22f..e9769cd7f 100644
--- a/hw/grackle_pci.c
+++ b/hw/grackle_pci.c
@@ -31,10 +31,10 @@
//#define DEBUG_GRACKLE
#ifdef DEBUG_GRACKLE
-#define GRACKLE_DPRINTF(fmt, args...) \
-do { printf("GRACKLE: " fmt , ##args); } while (0)
+#define GRACKLE_DPRINTF(fmt, ...) \
+ do { printf("GRACKLE: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define GRACKLE_DPRINTF(fmt, args...)
+#define GRACKLE_DPRINTF(fmt, ...)
#endif
typedef target_phys_addr_t pci_addr_t;
diff --git a/hw/heathrow_pic.c b/hw/heathrow_pic.c
index f0518bb0b..9a67ec0da 100644
--- a/hw/heathrow_pic.c
+++ b/hw/heathrow_pic.c
@@ -29,10 +29,10 @@
//#define DEBUG_PIC
#ifdef DEBUG_PIC
-#define PIC_DPRINTF(fmt, args...) \
-do { printf("PIC: " fmt , ##args); } while (0)
+#define PIC_DPRINTF(fmt, ...) \
+ do { printf("PIC: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define PIC_DPRINTF(fmt, args...)
+#define PIC_DPRINTF(fmt, ...)
#endif
typedef struct HeathrowPIC {
diff --git a/hw/iommu.c b/hw/iommu.c
index cde5f1f0b..d52acd7a2 100644
--- a/hw/iommu.c
+++ b/hw/iommu.c
@@ -28,10 +28,10 @@
//#define DEBUG_IOMMU
#ifdef DEBUG_IOMMU
-#define DPRINTF(fmt, args...) \
-do { printf("IOMMU: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("IOMMU: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
#define IOMMU_NREGS (4*4096/4)
diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index 1f4f8b7ef..f4e57aedb 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -19,14 +19,14 @@
//#define DEBUG_LSI_REG
#ifdef DEBUG_LSI
-#define DPRINTF(fmt, args...) \
-do { printf("lsi_scsi: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "lsi_scsi: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("lsi_scsi: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "lsi_scsi: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "lsi_scsi: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
#define LSI_SCNTL0_TRG 0x01
diff --git a/hw/m48t59.c b/hw/m48t59.c
index 0cfdab39f..c6829beb3 100644
--- a/hw/m48t59.c
+++ b/hw/m48t59.c
@@ -30,9 +30,9 @@
//#define DEBUG_NVRAM
#if defined(DEBUG_NVRAM)
-#define NVRAM_PRINTF(fmt, args...) do { printf(fmt , ##args); } while (0)
+#define NVRAM_PRINTF(fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while (0)
#else
-#define NVRAM_PRINTF(fmt, args...) do { } while (0)
+#define NVRAM_PRINTF(fmt, ...) do { } while (0)
#endif
/*
diff --git a/hw/mac_dbdma.c b/hw/mac_dbdma.c
index e863980d9..a94cd092c 100644
--- a/hw/mac_dbdma.c
+++ b/hw/mac_dbdma.c
@@ -44,10 +44,10 @@
//#define DEBUG_DBDMA
#ifdef DEBUG_DBDMA
-#define DBDMA_DPRINTF(fmt, args...) \
-do { printf("DBDMA: " fmt , ##args); } while (0)
+#define DBDMA_DPRINTF(fmt, ...) \
+ do { printf("DBDMA: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DBDMA_DPRINTF(fmt, args...)
+#define DBDMA_DPRINTF(fmt, ...)
#endif
/*
diff --git a/hw/mac_nvram.c b/hw/mac_nvram.c
index ae4d4bbf4..36648d187 100644
--- a/hw/mac_nvram.c
+++ b/hw/mac_nvram.c
@@ -31,10 +31,10 @@
//#define DEBUG_NVR
#ifdef DEBUG_NVR
-#define NVR_DPRINTF(fmt, args...) \
-do { printf("NVR: " fmt , ##args); } while (0)
+#define NVR_DPRINTF(fmt, ...) \
+ do { printf("NVR: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define NVR_DPRINTF(fmt, args...)
+#define NVR_DPRINTF(fmt, ...)
#endif
struct MacIONVRAMState {
diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c
index 81f179bf6..6c0acc578 100644
--- a/hw/mcf_fec.c
+++ b/hw/mcf_fec.c
@@ -14,10 +14,10 @@
//#define DEBUG_FEC 1
#ifdef DEBUG_FEC
-#define DPRINTF(fmt, args...) \
-do { printf("mcf_fec: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
#define FEC_MAX_FRAME_SIZE 2032
diff --git a/hw/mips_malta.c b/hw/mips_malta.c
index fd81753d2..9710adc24 100644
--- a/hw/mips_malta.c
+++ b/hw/mips_malta.c
@@ -114,9 +114,9 @@ static void malta_fpga_update_display(void *opaque)
//~ #define DEBUG
#if defined(DEBUG)
-# define logout(fmt, args...) fprintf(stderr, "MALTA\t%-24s" fmt, __func__, ##args)
+# define logout(fmt, ...) fprintf(stderr, "MALTA\t%-24s" fmt, __func__, ## __VA_ARGS__)
#else
-# define logout(fmt, args...) ((void)0)
+# define logout(fmt, ...) ((void)0)
#endif
struct _eeprom24c0x_t {
diff --git a/hw/openpic.c b/hw/openpic.c
index 53747c458..561c609e3 100644
--- a/hw/openpic.c
+++ b/hw/openpic.c
@@ -40,9 +40,9 @@
//#define DEBUG_OPENPIC
#ifdef DEBUG_OPENPIC
-#define DPRINTF(fmt, args...) do { printf(fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) do { printf(fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do { } while (0)
+#define DPRINTF(fmt, ...) do { } while (0)
#endif
#define USE_MPCxxx /* Intel model is broken, for now */
diff --git a/hw/parallel.c b/hw/parallel.c
index 0abd0a2c0..dd2eedab7 100644
--- a/hw/parallel.c
+++ b/hw/parallel.c
@@ -30,9 +30,9 @@
//#define DEBUG_PARALLEL
#ifdef DEBUG_PARALLEL
-#define pdebug(fmt, arg...) printf("pp: " fmt, ##arg)
+#define pdebug(fmt, ...) printf("pp: " fmt, ## __VA_ARGS__)
#else
-#define pdebug(fmt, arg...) ((void)0)
+#define pdebug(fmt, ...) ((void)0)
#endif
#define PARA_REG_DATA 0
diff --git a/hw/pci_host.h b/hw/pci_host.h
index c4f42a40e..757b0e283 100644
--- a/hw/pci_host.h
+++ b/hw/pci_host.h
@@ -29,10 +29,10 @@
//#define DEBUG_PCI
#ifdef DEBUG_PCI
-#define PCI_DPRINTF(fmt, args...) \
-do { printf("pci_host_data: " fmt , ##args); } while (0)
+#define PCI_DPRINTF(fmt, ...) \
+do { printf("pci_host_data: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define PCI_DPRINTF(fmt, args...)
+#define PCI_DPRINTF(fmt, ...)
#endif
typedef struct {
diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c
index 1c433aa85..d696560ac 100644
--- a/hw/pflash_cfi01.c
+++ b/hw/pflash_cfi01.c
@@ -42,20 +42,20 @@
#include "block.h"
#include "qemu-timer.h"
-#define PFLASH_BUG(fmt, args...) \
+#define PFLASH_BUG(fmt, ...) \
do { \
- printf("PFLASH: Possible BUG - " fmt, ##args); \
+ printf("PFLASH: Possible BUG - " fmt, ## __VA_ARGS__); \
exit(1); \
} while(0)
/* #define PFLASH_DEBUG */
#ifdef PFLASH_DEBUG
-#define DPRINTF(fmt, args...) \
+#define DPRINTF(fmt, ...) \
do { \
- printf("PFLASH: " fmt , ##args); \
+ printf("PFLASH: " fmt , ## __VA_ARGS__); \
} while (0)
#else
-#define DPRINTF(fmt, args...) do { } while (0)
+#define DPRINTF(fmt, ...) do { } while (0)
#endif
struct pflash_t {
diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c
index 799398ca1..60edbf5d2 100644
--- a/hw/pflash_cfi02.c
+++ b/hw/pflash_cfi02.c
@@ -43,12 +43,12 @@
//#define PFLASH_DEBUG
#ifdef PFLASH_DEBUG
-#define DPRINTF(fmt, args...) \
+#define DPRINTF(fmt, ...) \
do { \
- printf("PFLASH: " fmt , ##args); \
+ printf("PFLASH: " fmt , ## __VA_ARGS__); \
} while (0)
#else
-#define DPRINTF(fmt, args...) do { } while (0)
+#define DPRINTF(fmt, ...) do { } while (0)
#endif
struct pflash_t {
diff --git a/hw/pl022.c b/hw/pl022.c
index 3027bcf7e..4f0ff87da 100644
--- a/hw/pl022.c
+++ b/hw/pl022.c
@@ -13,14 +13,14 @@
//#define DEBUG_PL022 1
#ifdef DEBUG_PL022
-#define DPRINTF(fmt, args...) \
-do { printf("pl022: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "pl022: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("pl022: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "pl022: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
#define PL022_CR1_LBM 0x01
diff --git a/hw/pl031.c b/hw/pl031.c
index bb4750784..6b27180bd 100644
--- a/hw/pl031.c
+++ b/hw/pl031.c
@@ -16,10 +16,10 @@
//#define DEBUG_PL031
#ifdef DEBUG_PL031
-#define DPRINTF(fmt, args...) \
-do { printf("pl031: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("pl031: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
#define RTC_DR 0x00 /* Data read register */
diff --git a/hw/pl061.c b/hw/pl061.c
index 71141adb1..1263992bb 100644
--- a/hw/pl061.c
+++ b/hw/pl061.c
@@ -14,14 +14,14 @@
//#define DEBUG_PL061 1
#ifdef DEBUG_PL061
-#define DPRINTF(fmt, args...) \
-do { printf("pl061: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "pl061: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("pl061: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "pl061: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "pl061: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
static const uint8_t pl061_id[12] =
diff --git a/hw/pl181.c b/hw/pl181.c
index b6a86d3a6..ab4e978ae 100644
--- a/hw/pl181.c
+++ b/hw/pl181.c
@@ -14,10 +14,10 @@
//#define DEBUG_PL181 1
#ifdef DEBUG_PL181
-#define DPRINTF(fmt, args...) \
-do { printf("pl181: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("pl181: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
#define PL181_FIFO_LEN 16
diff --git a/hw/ppc4xx_pci.c b/hw/ppc4xx_pci.c
index 2e675083d..5198bbb61 100644
--- a/hw/ppc4xx_pci.c
+++ b/hw/ppc4xx_pci.c
@@ -33,7 +33,7 @@ typedef target_phys_addr_t pci_addr_t;
#ifdef DEBUG
#define DPRINTF(fmt, ...) do { printf(fmt, ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif /* DEBUG */
struct PCIMasterMap {
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index 760249ea2..29faa0631 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -44,10 +44,10 @@
//#define DEBUG_UNIN
#ifdef DEBUG_UNIN
-#define UNIN_DPRINTF(fmt, args...) \
-do { printf("UNIN: " fmt , ##args); } while (0)
+#define UNIN_DPRINTF(fmt, ...) \
+ do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define UNIN_DPRINTF(fmt, args...)
+#define UNIN_DPRINTF(fmt, ...)
#endif
/* UniN device */
diff --git a/hw/ppc_prep.c b/hw/ppc_prep.c
index 9584d9168..b98c6c200 100644
--- a/hw/ppc_prep.c
+++ b/hw/ppc_prep.c
@@ -50,18 +50,18 @@
#endif
#if defined (HARD_DEBUG_PPC_IO)
-#define PPC_IO_DPRINTF(fmt, args...) \
+#define PPC_IO_DPRINTF(fmt, ...) \
do { \
if (qemu_loglevel_mask(CPU_LOG_IOPORT)) { \
- qemu_log("%s: " fmt, __func__ , ##args); \
+ qemu_log("%s: " fmt, __func__ , ## __VA_ARGS__); \
} else { \
- printf("%s : " fmt, __func__ , ##args); \
+ printf("%s : " fmt, __func__ , ## __VA_ARGS__); \
} \
} while (0)
#elif defined (DEBUG_PPC_IO)
-#define PPC_IO_DPRINTF(fmt, args...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__)
+#define PPC_IO_DPRINTF(fmt, ...) qemu_log_mask(CPU_LOG_IOPORT, ## __VA_ARGS__)
#else
-#define PPC_IO_DPRINTF(fmt, args...) do { } while (0)
+#define PPC_IO_DPRINTF(fmt, ...) do { } while (0)
#endif
/* Constants for devices init */
diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c
index 547218fab..9eed890d4 100644
--- a/hw/ppce500_pci.c
+++ b/hw/ppce500_pci.c
@@ -24,9 +24,9 @@ typedef target_phys_addr_t pci_addr_t;
#include "qemu-log.h"
#ifdef DEBUG_PCI
-#define pci_debug(fmt, arg...) fprintf(stderr, fmt, ##arg)
+#define pci_debug(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__)
#else
-#define pci_debug(fmt, arg...)
+#define pci_debug(fmt, ...)
#endif
#define PCIE500_CFGADDR 0x0
diff --git a/hw/rc4030.c b/hw/rc4030.c
index 2f9bb0e43..7fe84ff49 100644
--- a/hw/rc4030.c
+++ b/hw/rc4030.c
@@ -33,16 +33,16 @@
//#define DEBUG_RC4030_DMA
#ifdef DEBUG_RC4030
-#define DPRINTF(fmt, args...) \
-do { printf("rc4030: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("rc4030: " fmt , ## __VA_ARGS__); } while (0)
static const char* irq_names[] = { "parallel", "floppy", "sound", "video",
"network", "scsi", "keyboard", "mouse", "serial0", "serial1" };
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
-#define RC4030_ERROR(fmt, args...) \
-do { fprintf(stderr, "rc4030 ERROR: %s: " fmt, __func__ , ##args); } while (0)
+#define RC4030_ERROR(fmt, ...) \
+do { fprintf(stderr, "rc4030 ERROR: %s: " fmt, __func__ , ## __VA_ARGS__); } while (0)
/********************************************************/
/* rc4030 emulation */
diff --git a/hw/sbi.c b/hw/sbi.c
index 9c41f5365..1993eec5c 100644
--- a/hw/sbi.c
+++ b/hw/sbi.c
@@ -28,10 +28,10 @@
//#define DEBUG_IRQ
#ifdef DEBUG_IRQ
-#define DPRINTF(fmt, args...) \
-do { printf("IRQ: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
#define MAX_CPUS 16
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index 8f1afab51..a0485dbeb 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -18,14 +18,14 @@
//#define DEBUG_SCSI
#ifdef DEBUG_SCSI
-#define DPRINTF(fmt, args...) \
-do { printf("scsi-disk: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "scsi-disk: " fmt , ##args); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
#include "qemu-common.h"
#include "block.h"
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index f4c615b62..c827c04a1 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -28,14 +28,14 @@ SCSIDevice *scsi_generic_init(BlockDriverState *bdrv, int tcq,
//#define DEBUG_SCSI
#ifdef DEBUG_SCSI
-#define DPRINTF(fmt, args...) \
-do { printf("scsi-generic: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "scsi-generic: " fmt , ##args); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "scsi-generic: " fmt , ## __VA_ARGS__); } while (0)
#include <stdio.h>
#include <sys/types.h>
diff --git a/hw/sd.c b/hw/sd.c
index fc9253013..988854743 100644
--- a/hw/sd.c
+++ b/hw/sd.c
@@ -36,10 +36,10 @@
//#define DEBUG_SD 1
#ifdef DEBUG_SD
-#define DPRINTF(fmt, args...) \
-do { fprintf(stderr, "SD: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { fprintf(stderr, "SD: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
typedef enum {
diff --git a/hw/sh_intc.h b/hw/sh_intc.h
index a9750ae9b..c117d6fb8 100644
--- a/hw/sh_intc.h
+++ b/hw/sh_intc.h
@@ -18,7 +18,7 @@ struct intc_group {
intc_enum enum_ids[32];
};
-#define INTC_GROUP(enum_id, ids...) { enum_id, { ids } }
+#define INTC_GROUP(enum_id, ...) { enum_id, { __VA_ARGS__ } }
struct intc_mask_reg {
unsigned long set_reg, clr_reg, reg_width;
diff --git a/hw/slavio_intctl.c b/hw/slavio_intctl.c
index 9ee5ff89b..b68893490 100644
--- a/hw/slavio_intctl.c
+++ b/hw/slavio_intctl.c
@@ -29,10 +29,10 @@
//#define DEBUG_IRQ
#ifdef DEBUG_IRQ
-#define DPRINTF(fmt, args...) \
-do { printf("IRQ: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
/*
diff --git a/hw/slavio_misc.c b/hw/slavio_misc.c
index 8da7f4ad9..ecece54e5 100644
--- a/hw/slavio_misc.c
+++ b/hw/slavio_misc.c
@@ -37,10 +37,10 @@
*/
#ifdef DEBUG_MISC
-#define MISC_DPRINTF(fmt, args...) \
-do { printf("MISC: " fmt , ##args); } while (0)
+#define MISC_DPRINTF(fmt, ...) \
+ do { printf("MISC: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define MISC_DPRINTF(fmt, args...)
+#define MISC_DPRINTF(fmt, ...)
#endif
typedef struct MiscState {
diff --git a/hw/slavio_timer.c b/hw/slavio_timer.c
index 6a29ce271..725b16d0e 100644
--- a/hw/slavio_timer.c
+++ b/hw/slavio_timer.c
@@ -28,10 +28,10 @@
//#define DEBUG_TIMER
#ifdef DEBUG_TIMER
-#define DPRINTF(fmt, args...) \
-do { printf("TIMER: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("TIMER: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while (0)
+#define DPRINTF(fmt, ...) do {} while (0)
#endif
/*
diff --git a/hw/sm501.c b/hw/sm501.c
index fe3782bf4..316aba2c6 100644
--- a/hw/sm501.c
+++ b/hw/sm501.c
@@ -47,9 +47,9 @@
//#define DEBUG_BITBLT
#ifdef DEBUG_SM501
-#define SM501_DPRINTF(fmt...) printf(fmt)
+#define SM501_DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__)
#else
-#define SM501_DPRINTF(fmt...) do {} while(0)
+#define SM501_DPRINTF(fmt, ...) do {} while(0)
#endif
diff --git a/hw/smbus.c b/hw/smbus.c
index 6eb841240..222c3fdc9 100644
--- a/hw/smbus.c
+++ b/hw/smbus.c
@@ -16,14 +16,14 @@
//#define DEBUG_SMBUS 1
#ifdef DEBUG_SMBUS
-#define DPRINTF(fmt, args...) \
-do { printf("smbus(%02x): " fmt , dev->i2c.address, ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "smbus: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("smbus(%02x): " fmt , dev->i2c.address, ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "smbus: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "smbus: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "smbus: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
enum {
diff --git a/hw/sparc32_dma.c b/hw/sparc32_dma.c
index b1495dd95..cab9af77e 100644
--- a/hw/sparc32_dma.c
+++ b/hw/sparc32_dma.c
@@ -37,10 +37,10 @@
*/
#ifdef DEBUG_DMA
-#define DPRINTF(fmt, args...) \
-do { printf("DMA: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("DMA: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
#define DMA_REGS 4
diff --git a/hw/ssd0303.c b/hw/ssd0303.c
index 56cf72d93..f13f804d7 100644
--- a/hw/ssd0303.c
+++ b/hw/ssd0303.c
@@ -17,14 +17,14 @@
//#define DEBUG_SSD0303 1
#ifdef DEBUG_SSD0303
-#define DPRINTF(fmt, args...) \
-do { printf("ssd0303: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssd0303: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("ssd0303: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssd0303: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssd0303: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssd0303: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
/* Scaling factor for pixels. */
diff --git a/hw/ssd0323.c b/hw/ssd0323.c
index b640dd093..5b83d2760 100644
--- a/hw/ssd0323.c
+++ b/hw/ssd0323.c
@@ -17,14 +17,14 @@
//#define DEBUG_SSD0323 1
#ifdef DEBUG_SSD0323
-#define DPRINTF(fmt, args...) \
-do { printf("ssd0323: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssd0323: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("ssd0323: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssd0323: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
/* Scaling factor for pixels. */
diff --git a/hw/ssi-sd.c b/hw/ssi-sd.c
index 93d237495..a1af85b70 100644
--- a/hw/ssi-sd.c
+++ b/hw/ssi-sd.c
@@ -13,14 +13,14 @@
//#define DEBUG_SSI_SD 1
#ifdef DEBUG_SSI_SD
-#define DPRINTF(fmt, args...) \
-do { printf("ssi_sd: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssi_sd: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("ssi_sd: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssi_sd: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "ssi_sd: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "ssi_sd: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
typedef enum {
diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c
index c9a0909e9..d1ec61a5c 100644
--- a/hw/stellaris_enet.c
+++ b/hw/stellaris_enet.c
@@ -14,14 +14,14 @@
//#define DEBUG_STELLARIS_ENET 1
#ifdef DEBUG_STELLARIS_ENET
-#define DPRINTF(fmt, args...) \
-do { printf("stellaris_enet: " fmt , ##args); } while (0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args); exit(1);} while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("stellaris_enet: " fmt , ## __VA_ARGS__); } while (0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "stellaris_enet: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
-#define BADF(fmt, args...) \
-do { fprintf(stderr, "stellaris_enet: error: " fmt , ##args);} while (0)
+#define DPRINTF(fmt, ...) do {} while(0)
+#define BADF(fmt, ...) \
+do { fprintf(stderr, "stellaris_enet: error: " fmt , ## __VA_ARGS__);} while (0)
#endif
#define SE_INT_RX 0x01
diff --git a/hw/sun4c_intctl.c b/hw/sun4c_intctl.c
index 33df65309..1b555578c 100644
--- a/hw/sun4c_intctl.c
+++ b/hw/sun4c_intctl.c
@@ -28,10 +28,10 @@
//#define DEBUG_IRQ
#ifdef DEBUG_IRQ
-#define DPRINTF(fmt, args...) \
-do { printf("IRQ: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("IRQ: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
/*
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 8c7451ba4..786b731b9 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -68,10 +68,10 @@
*/
#ifdef DEBUG_IRQ
-#define DPRINTF(fmt, args...) \
- do { printf("CPUIRQ: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
#define KERNEL_LOAD_ADDR 0x00004000
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 6dd4c0b98..1c8b13602 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -36,10 +36,10 @@
//#define DEBUG_IRQ
#ifdef DEBUG_IRQ
-#define DPRINTF(fmt, args...) \
- do { printf("CPUIRQ: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+ do { printf("CPUIRQ: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...)
+#define DPRINTF(fmt, ...)
#endif
#define KERNEL_LOAD_ADDR 0x00404000
diff --git a/hw/unin_pci.c b/hw/unin_pci.c
index b75191679..8277b67a2 100644
--- a/hw/unin_pci.c
+++ b/hw/unin_pci.c
@@ -29,10 +29,10 @@
//#define DEBUG_UNIN
#ifdef DEBUG_UNIN
-#define UNIN_DPRINTF(fmt, args...) \
-do { printf("UNIN: " fmt , ##args); } while (0)
+#define UNIN_DPRINTF(fmt, ...) \
+ do { printf("UNIN: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define UNIN_DPRINTF(fmt, args...)
+#define UNIN_DPRINTF(fmt, ...)
#endif
typedef target_phys_addr_t pci_addr_t;
diff --git a/hw/usb-msd.c b/hw/usb-msd.c
index 41c92c3f1..3a3eb4a9a 100644
--- a/hw/usb-msd.c
+++ b/hw/usb-msd.c
@@ -16,10 +16,10 @@
//#define DEBUG_MSD
#ifdef DEBUG_MSD
-#define DPRINTF(fmt, args...) \
-do { printf("usb-msd: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("usb-msd: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
/* USB requests. */
diff --git a/hw/usb-serial.c b/hw/usb-serial.c
index 52084822f..be231f91e 100644
--- a/hw/usb-serial.c
+++ b/hw/usb-serial.c
@@ -15,10 +15,10 @@
//#define DEBUG_Serial
#ifdef DEBUG_Serial
-#define DPRINTF(fmt, args...) \
-do { printf("usb-serial: " fmt , ##args); } while (0)
+#define DPRINTF(fmt, ...) \
+do { printf("usb-serial: " fmt , ## __VA_ARGS__); } while (0)
#else
-#define DPRINTF(fmt, args...) do {} while(0)
+#define DPRINTF(fmt, ...) do {} while(0)
#endif
#define RECV_BUF 384