aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-02-20 20:39:25 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-22 14:40:51 +0400
commit9edc6313da34699ebd2bae4573ea22339b26450a (patch)
treec04eb27a7ce157789496b078b824c8eae8ddba05 /hw
parente7b794282264868d84b3d9a5da222b08a783d8fb (diff)
Replace GCC_FMT_ATTR with G_GNUC_PRINTF
One less qemu-specific macro. It also helps to make some headers/units only depend on glib, and thus moved in standalone projects eventually. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard W.M. Jones <rjones@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/9pfs/9p.c2
-rw-r--r--hw/acpi/aml-build.c4
-rw-r--r--hw/display/qxl.h2
-rw-r--r--hw/mips/fuloong2e.c2
-rw-r--r--hw/mips/malta.c2
-rw-r--r--hw/net/rocker/rocker.h2
-rw-r--r--hw/net/rtl8139.c2
-rw-r--r--hw/virtio/virtio.c2
-rw-r--r--hw/xen/xen_pt.h2
9 files changed, 10 insertions, 10 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 8e9d4aea73..dcaa602d4c 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -203,7 +203,7 @@ void v9fs_path_free(V9fsPath *path)
}
-void GCC_FMT_ATTR(2, 3)
+void G_GNUC_PRINTF(2, 3)
v9fs_path_sprintf(V9fsPath *path, const char *fmt, ...)
{
va_list ap;
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 1773cf55f1..4086879ebf 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -207,7 +207,7 @@ build_append_nameseg(GArray *array, const char *seg)
g_array_append_vals(array, "____", ACPI_NAMESEG_LEN - len);
}
-static void GCC_FMT_ATTR(2, 0)
+static void G_GNUC_PRINTF(2, 0)
build_append_namestringv(GArray *array, const char *format, va_list ap)
{
char *s;
@@ -270,7 +270,7 @@ build_append_namestringv(GArray *array, const char *format, va_list ap)
g_strfreev(segs);
}
-GCC_FMT_ATTR(2, 3)
+G_GNUC_PRINTF(2, 3)
static void build_append_namestring(GArray *array, const char *format, ...)
{
va_list ap;
diff --git a/hw/display/qxl.h b/hw/display/qxl.h
index 30d21f4d0b..e74de9579d 100644
--- a/hw/display/qxl.h
+++ b/hw/display/qxl.h
@@ -149,7 +149,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(PCIQXLDevice, PCI_QXL)
/* qxl.c */
void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL phys, int group_id);
void qxl_set_guest_bug(PCIQXLDevice *qxl, const char *msg, ...)
- GCC_FMT_ATTR(2, 3);
+ G_GNUC_PRINTF(2, 3);
void qxl_spice_update_area(PCIQXLDevice *qxl, uint32_t surface_id,
struct QXLRect *area, struct QXLRect *dirty_rects,
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index c1b8066a13..c9f14e70a0 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -72,7 +72,7 @@ static struct _loaderparams {
const char *initrd_filename;
} loaderparams;
-static void GCC_FMT_ATTR(3, 4) prom_set(uint32_t *prom_buf, int index,
+static void G_GNUC_PRINTF(3, 4) prom_set(uint32_t *prom_buf, int index,
const char *string, ...)
{
va_list ap;
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 55037eb90f..6288511723 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -995,7 +995,7 @@ static void write_bootloader(uint8_t *base, uint64_t run_addr,
}
-static void GCC_FMT_ATTR(3, 4) prom_set(uint32_t *prom_buf, int index,
+static void G_GNUC_PRINTF(3, 4) prom_set(uint32_t *prom_buf, int index,
const char *string, ...)
{
va_list ap;
diff --git a/hw/net/rocker/rocker.h b/hw/net/rocker/rocker.h
index 412fa44d01..f85354d9d1 100644
--- a/hw/net/rocker/rocker.h
+++ b/hw/net/rocker/rocker.h
@@ -30,7 +30,7 @@
fprintf(stderr, "%s ROCKER: " fmt, nowstr, ## __VA_ARGS__);\
} while (0)
#else
-static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...)
+static inline G_GNUC_PRINTF(1, 2) int DPRINTF(const char *fmt, ...)
{
return 0;
}
diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c
index 90b4fc63ce..6b65823b4b 100644
--- a/hw/net/rtl8139.c
+++ b/hw/net/rtl8139.c
@@ -86,7 +86,7 @@
# define DPRINTF(fmt, ...) \
do { fprintf(stderr, "RTL8139: " fmt, ## __VA_ARGS__); } while (0)
#else
-static inline GCC_FMT_ATTR(1, 2) int DPRINTF(const char *fmt, ...)
+static inline G_GNUC_PRINTF(1, 2) int DPRINTF(const char *fmt, ...)
{
return 0;
}
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 32b1859391..9d637e043e 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -3579,7 +3579,7 @@ void virtio_device_set_child_bus_name(VirtIODevice *vdev, char *bus_name)
vdev->bus_name = g_strdup(bus_name);
}
-void GCC_FMT_ATTR(2, 3) virtio_error(VirtIODevice *vdev, const char *fmt, ...)
+void G_GNUC_PRINTF(2, 3) virtio_error(VirtIODevice *vdev, const char *fmt, ...)
{
va_list ap;
diff --git a/hw/xen/xen_pt.h b/hw/xen/xen_pt.h
index c74c4678f2..6b8e13cdee 100644
--- a/hw/xen/xen_pt.h
+++ b/hw/xen/xen_pt.h
@@ -9,7 +9,7 @@
bool xen_igd_gfx_pt_enabled(void);
void xen_igd_gfx_pt_set(bool value, Error **errp);
-void xen_pt_log(const PCIDevice *d, const char *f, ...) GCC_FMT_ATTR(2, 3);
+void xen_pt_log(const PCIDevice *d, const char *f, ...) G_GNUC_PRINTF(2, 3);
#define XEN_PT_ERR(d, _f, _a...) xen_pt_log(d, "%s: Error: "_f, __func__, ##_a)