[PATCH 05/35] Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduced in GLib 2.10.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/admin/admin_server_dispatch.c      |  2 +-
 src/conf/device_conf.h                 |  2 +-
 src/conf/domain_conf.c                 |  2 +-
 src/conf/domain_conf.h                 | 38 ++++++------
 src/conf/netdev_bandwidth_conf.h       |  2 +-
 src/conf/virnetworkobj.h               |  2 +-
 src/driver.h                           | 18 +++---
 src/interface/interface_backend_udev.c |  6 +-
 src/libxl/libxl_domain.h               |  4 +-
 src/lxc/lxc_domain.h                   |  2 +-
 src/nwfilter/nwfilter_learnipaddr.h    |  2 +-
 src/qemu/qemu_block.h                  |  4 +-
 src/qemu/qemu_blockjob.h               |  2 +-
 src/qemu/qemu_cgroup.h                 |  4 +-
 src/qemu/qemu_domain.h                 | 24 ++++----
 src/qemu/qemu_extdevice.h              |  8 +--
 src/qemu/qemu_migration.c              |  2 +-
 src/qemu/qemu_migration.h              |  2 +-
 src/qemu/qemu_tpm.h                    |  8 +--
 src/qemu/qemu_vhost_user_gpu.h         |  6 +-
 src/remote/remote_daemon_dispatch.c    | 24 ++++----
 src/rpc/virnetmessage.h                | 14 ++---
 src/secret/secret_util.h               |  2 +-
 src/storage/storage_driver.h           |  2 +-
 src/storage/storage_util.h             |  2 +-
 src/util/viralloc.h                    | 14 ++---
 src/util/virbitmap.h                   | 22 +++----
 src/util/vircommand.h                  | 18 +++---
 src/util/vircrypto.h                   |  6 +-
 src/util/virfile.h                     | 70 +++++++++++-----------
 src/util/viriptables.h                 | 20 +++----
 src/util/viriscsi.h                    | 12 ++--
 src/util/virjson.h                     |  2 +-
 src/util/virkeyfile.h                  |  4 +-
 src/util/virmacaddr.h                  |  4 +-
 src/util/virnetdev.h                   | 80 +++++++++++++-------------
 src/util/virnetdevbandwidth.h          | 12 ++--
 src/util/virnetdevbridge.h             | 32 +++++------
 src/util/virnetdevip.h                 |  8 +--
 src/util/virnetdevmacvlan.h            | 18 +++---
 src/util/virnetdevmidonet.h            |  4 +-
 src/util/virnetdevopenvswitch.h        | 20 +++----
 src/util/virnetdevtap.h                | 16 +++---
 src/util/virnetdevveth.h               |  4 +-
 src/util/virnetdevvportprofile.h       |  4 +-
 src/util/virnetlink.h                  |  2 +-
 src/util/virpci.h                      |  2 +-
 src/util/virpidfile.h                  | 16 +++---
 src/util/virprocess.h                  |  2 +-
 src/util/virrandom.h                   |  2 +-
 src/util/virstring.h                   | 40 ++++++-------
 src/util/virthread.h                   | 20 +++----
 src/util/virthreadpool.h               |  2 +-
 src/util/virtime.h                     | 14 ++---
 src/util/virtypedparam.h               | 20 +++----
 src/util/virutil.h                     | 18 +++---
 src/util/viruuid.h                     |  2 +-
 src/util/virxml.h                      |  4 +-
 tools/virsh-domain-monitor.h           |  2 +-
 tools/virsh-util.h                     |  4 +-
 tools/vsh.h                            | 22 +++----
 61 files changed, 363 insertions(+), 363 deletions(-)

diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dispatch.c
index 3c4d72dedb..f07ae6df1d 100644
--- a/src/admin/admin_server_dispatch.c
+++ b/src/admin/admin_server_dispatch.c
@@ -135,7 +135,7 @@ get_nonnull_server(virNetDaemonPtr dmn, admin_nonnull_server srv)
     return virNetDaemonGetServer(dmn, srv.name);
 }
 
-static int ATTRIBUTE_RETURN_CHECK
+static int G_GNUC_WARN_UNUSED_RESULT
 make_nonnull_server(admin_nonnull_server *srv_dst,
                     virNetServerPtr srv_src)
 {
diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h
index d0854925e3..d98fae775c 100644
--- a/src/conf/device_conf.h
+++ b/src/conf/device_conf.h
@@ -186,7 +186,7 @@ void virDomainDeviceInfoFree(virDomainDeviceInfoPtr info);
 
 bool virDomainDeviceInfoAddressIsEqual(const virDomainDeviceInfo *a,
                                        const virDomainDeviceInfo *b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 bool virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info,
                                    int type);
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c1705a07b6..35a51f1793 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17521,7 +17521,7 @@ virDomainChrFind(virDomainDefPtr def,
 
 /* Return the address within vmdef to be modified when working with a
  * chrdefptr of the given type.  */
-static int ATTRIBUTE_RETURN_CHECK
+static int G_GNUC_WARN_UNUSED_RESULT
 virDomainChrGetDomainPtrsInternal(virDomainDefPtr vmdef,
                                   virDomainChrDeviceType type,
                                   virDomainChrDefPtr ***arrPtr,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index f7404b814f..e2edca149a 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2814,7 +2814,7 @@ int virDomainDefSetVcpus(virDomainDefPtr def, unsigned int vcpus);
 unsigned int virDomainDefGetVcpus(const virDomainDef *def);
 virBitmapPtr virDomainDefGetOnlineVcpumap(const virDomainDef *def);
 virDomainVcpuDefPtr virDomainDefGetVcpu(virDomainDefPtr def, unsigned int vcpu)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 void virDomainDefVcpuOrderClear(virDomainDefPtr def);
 int  virDomainDefGetVcpusTopology(const virDomainDef *def,
                                   unsigned int *maxvcpus);
@@ -2844,11 +2844,11 @@ int virDomainDiskGetType(virDomainDiskDefPtr def);
 void virDomainDiskSetType(virDomainDiskDefPtr def, int type);
 const char *virDomainDiskGetSource(virDomainDiskDef const *def);
 int virDomainDiskSetSource(virDomainDiskDefPtr def, const char *src)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 void virDomainDiskEmptySource(virDomainDiskDefPtr def);
 const char *virDomainDiskGetDriver(const virDomainDiskDef *def);
 int virDomainDiskSetDriver(virDomainDiskDefPtr def, const char *name)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virDomainDiskGetFormat(virDomainDiskDefPtr def);
 void virDomainDiskSetFormat(virDomainDiskDefPtr def, int format);
 virDomainControllerDefPtr
@@ -2910,7 +2910,7 @@ int virDomainDeviceInfoIterate(virDomainDefPtr def,
 
 bool virDomainDefHasDeviceAddress(virDomainDefPtr def,
                                   virDomainDeviceInfoPtr info)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 void virDomainDefFree(virDomainDefPtr vm);
 VIR_DEFINE_AUTOPTR_FUNC(virDomainDef, virDomainDefFree);
@@ -3160,7 +3160,7 @@ virDomainDiskDefPtr virDomainDiskByName(virDomainDefPtr def,
 const char *virDomainDiskPathByName(virDomainDefPtr, const char *name);
 int virDomainDiskInsert(virDomainDefPtr def,
                         virDomainDiskDefPtr disk)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 void virDomainDiskInsertPreAlloced(virDomainDefPtr def,
                                    virDomainDiskDefPtr disk);
 int virDomainStorageNetworkParseHost(xmlNodePtr hostnode,
@@ -3221,7 +3221,7 @@ int virDomainNetAppendIPAddress(virDomainNetDefPtr def,
 
 int virDomainControllerInsert(virDomainDefPtr def,
                               virDomainControllerDefPtr controller)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
                                          virDomainControllerDefPtr controller);
 int virDomainControllerFind(const virDomainDef *def, int type, int idx);
@@ -3239,7 +3239,7 @@ int virDomainLeaseIndex(virDomainDefPtr def,
 int virDomainLeaseInsert(virDomainDefPtr def,
                          virDomainLeaseDefPtr lease);
 int virDomainLeaseInsertPreAlloc(virDomainDefPtr def)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 void virDomainLeaseInsertPreAlloced(virDomainDefPtr def,
                                     virDomainLeaseDefPtr lease);
 virDomainLeaseDefPtr
@@ -3287,7 +3287,7 @@ int virDomainSaveConfig(const char *configDir,
 int virDomainSaveStatus(virDomainXMLOptionPtr xmlopt,
                         const char *statusDir,
                         virDomainObjPtr obj,
-                        virCapsPtr caps) ATTRIBUTE_RETURN_CHECK;
+                        virCapsPtr caps) G_GNUC_WARN_UNUSED_RESULT;
 
 typedef void (*virDomainLoadConfigNotify)(virDomainObjPtr dom,
                                           int newDomain,
@@ -3357,29 +3357,29 @@ typedef const char* (*virEventActionToStringFunc)(int type);
 typedef int (*virEventActionFromStringFunc)(const char *type);
 
 int virDomainMemoryInsert(virDomainDefPtr def, virDomainMemoryDefPtr mem)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 virDomainMemoryDefPtr virDomainMemoryRemove(virDomainDefPtr def, int idx)
     ATTRIBUTE_NONNULL(1);
 int virDomainMemoryFindByDef(virDomainDefPtr def, virDomainMemoryDefPtr mem)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virDomainMemoryFindInactiveByDef(virDomainDefPtr def,
                                      virDomainMemoryDefPtr mem)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virDomainShmemDefInsert(virDomainDefPtr def, virDomainShmemDefPtr shmem)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 bool virDomainShmemDefEquals(virDomainShmemDefPtr src, virDomainShmemDefPtr dst)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 ssize_t virDomainShmemDefFind(virDomainDefPtr def, virDomainShmemDefPtr shmem)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 virDomainShmemDefPtr virDomainShmemDefRemove(virDomainDefPtr def, size_t idx)
     ATTRIBUTE_NONNULL(1);
 ssize_t virDomainInputDefFind(const virDomainDef *def,
                               const virDomainInputDef *input)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 bool virDomainVsockDefEquals(const virDomainVsockDef *a,
                              const virDomainVsockDef *b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 VIR_ENUM_DECL(virDomainTaint);
 VIR_ENUM_DECL(virDomainVirt);
@@ -3558,7 +3558,7 @@ virStorageSourcePtr
 virDomainStorageSourceParseBase(const char *type,
                                 const char *format,
                                 const char *index)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virDomainStorageSourceParse(xmlNodePtr node,
                                 xmlXPathContextPtr ctxt,
@@ -3572,7 +3572,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
                                virStorageSourcePtr src,
                                unsigned int flags,
                                virDomainXMLOptionPtr xmlopt)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
                                      int maplen,
@@ -3580,7 +3580,7 @@ int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
                                      unsigned char *cpumaps,
                                      int hostcpus,
                                      virBitmapPtr autoCpuset)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 
 bool virDomainDefHasMemballoon(const virDomainDef *def) ATTRIBUTE_NONNULL(1);
 
diff --git a/src/conf/netdev_bandwidth_conf.h b/src/conf/netdev_bandwidth_conf.h
index 42872cc496..898b2fb428 100644
--- a/src/conf/netdev_bandwidth_conf.h
+++ b/src/conf/netdev_bandwidth_conf.h
@@ -28,7 +28,7 @@ int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwidth,
                             unsigned int *class_id,
                             xmlNodePtr node,
                             bool allowFloor)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBandwidthFormat(virNetDevBandwidthPtr def,
                              unsigned int class_id,
                              virBufferPtr buf);
diff --git a/src/conf/virnetworkobj.h b/src/conf/virnetworkobj.h
index a91b4304c6..fe3ec5bbf8 100644
--- a/src/conf/virnetworkobj.h
+++ b/src/conf/virnetworkobj.h
@@ -202,7 +202,7 @@ virNetworkObjPortForEach(virNetworkObjPtr obj,
 int
 virNetworkObjSaveStatus(const char *statusDir,
                         virNetworkObjPtr net,
-                        virNetworkXMLOptionPtr xmlopt) ATTRIBUTE_RETURN_CHECK;
+                        virNetworkXMLOptionPtr xmlopt) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virNetworkObjLoadAllConfigs(virNetworkObjListPtr nets,
diff --git a/src/driver.h b/src/driver.h
index faf4788a4f..ca82ac974b 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -98,15 +98,15 @@ struct _virConnectDriver {
 };
 
 int virRegisterConnectDriver(virConnectDriverPtr driver,
-                             bool setSharedDrivers) ATTRIBUTE_RETURN_CHECK;
-int virRegisterStateDriver(virStateDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
-
-int virSetSharedInterfaceDriver(virInterfaceDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
-int virSetSharedNetworkDriver(virNetworkDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
-int virSetSharedNodeDeviceDriver(virNodeDeviceDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
-int virSetSharedNWFilterDriver(virNWFilterDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
-int virSetSharedSecretDriver(virSecretDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
-int virSetSharedStorageDriver(virStorageDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
+                             bool setSharedDrivers) G_GNUC_WARN_UNUSED_RESULT;
+int virRegisterStateDriver(virStateDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
+
+int virSetSharedInterfaceDriver(virInterfaceDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
+int virSetSharedNetworkDriver(virNetworkDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
+int virSetSharedNodeDeviceDriver(virNodeDeviceDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
+int virSetSharedNWFilterDriver(virNWFilterDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
+int virSetSharedSecretDriver(virSecretDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
+int virSetSharedStorageDriver(virStorageDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
 
 bool virHasDriverForURIScheme(const char *scheme);
 
diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index 1684b8ed83..4e381db3ef 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -588,7 +588,7 @@ udevBridgeScanDirFilter(const struct dirent *entry)
 
 static int
 ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
+ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
 udevGetIfaceDefBond(struct udev *udev,
                     struct udev_device *dev,
                     const char *name,
@@ -813,7 +813,7 @@ udevGetIfaceDefBond(struct udev *udev,
 
 static int
 ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
+ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
 udevGetIfaceDefBridge(struct udev *udev,
                       struct udev_device *dev,
                       const char *name,
@@ -919,7 +919,7 @@ udevGetIfaceDefBridge(struct udev *udev,
 
 static int
 ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
+ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
 udevGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
                     struct udev_device *dev ATTRIBUTE_UNUSED,
                     const char *name,
diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h
index 737ae6accd..7e28093722 100644
--- a/src/libxl/libxl_domain.h
+++ b/src/libxl/libxl_domain.h
@@ -86,7 +86,7 @@ int
 libxlDomainObjBeginJob(libxlDriverPrivatePtr driver,
                        virDomainObjPtr obj,
                        enum libxlDomainJob job)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void
 libxlDomainObjEndJob(libxlDriverPrivatePtr driver,
@@ -94,7 +94,7 @@ libxlDomainObjEndJob(libxlDriverPrivatePtr driver,
 
 int
 libxlDomainJobUpdateTime(struct libxlDomainJobObj *job)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 char *
 libxlDomainManagedSavePath(libxlDriverPrivatePtr driver,
diff --git a/src/lxc/lxc_domain.h b/src/lxc/lxc_domain.h
index 9cb7090b5b..319f83338f 100644
--- a/src/lxc/lxc_domain.h
+++ b/src/lxc/lxc_domain.h
@@ -99,7 +99,7 @@ int
 virLXCDomainObjBeginJob(virLXCDriverPtr driver,
                        virDomainObjPtr obj,
                        enum virLXCDomainJob job)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void
 virLXCDomainObjEndJob(virLXCDriverPtr driver,
diff --git a/src/nwfilter/nwfilter_learnipaddr.h b/src/nwfilter/nwfilter_learnipaddr.h
index 5b9294327f..2c214183a1 100644
--- a/src/nwfilter/nwfilter_learnipaddr.h
+++ b/src/nwfilter/nwfilter_learnipaddr.h
@@ -42,7 +42,7 @@ int virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver,
 bool virNWFilterHasLearnReq(int ifindex);
 int virNWFilterTerminateLearnReq(const char *ifname);
 
-int virNWFilterLockIface(const char *ifname) ATTRIBUTE_RETURN_CHECK;
+int virNWFilterLockIface(const char *ifname) G_GNUC_WARN_UNUSED_RESULT;
 void virNWFilterUnlockIface(const char *ifname);
 
 int virNWFilterLearnInit(void);
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index 2de614b159..87525af160 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -178,12 +178,12 @@ int
 qemuBlockStorageSourceCreateGetFormatProps(virStorageSourcePtr src,
                                            virStorageSourcePtr backing,
                                            virJSONValuePtr *props)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 qemuBlockStorageSourceCreateGetStorageProps(virStorageSourcePtr src,
                                             virJSONValuePtr *props)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 qemuBlockStorageSourceCreate(virDomainObjPtr vm,
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index 417f253e31..d8da918f2f 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -212,7 +212,7 @@ void qemuBlockJobSyncEnd(virDomainObjPtr vm,
 
 qemuBlockJobDataPtr
 qemuBlockJobGetByDisk(virDomainDiskDefPtr disk)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 qemuBlockjobState
 qemuBlockjobConvertMonitorStatus(int monitorstatus);
diff --git a/src/qemu/qemu_cgroup.h b/src/qemu/qemu_cgroup.h
index 91d0877947..54839b5bfb 100644
--- a/src/qemu/qemu_cgroup.h
+++ b/src/qemu/qemu_cgroup.h
@@ -40,10 +40,10 @@ int qemuTeardownInputCgroup(virDomainObjPtr vm,
                             virDomainInputDefPtr dev);
 int qemuSetupHostdevCgroup(virDomainObjPtr vm,
                            virDomainHostdevDefPtr dev)
-   ATTRIBUTE_RETURN_CHECK;
+   G_GNUC_WARN_UNUSED_RESULT;
 int qemuTeardownHostdevCgroup(virDomainObjPtr vm,
                               virDomainHostdevDefPtr dev)
-   ATTRIBUTE_RETURN_CHECK;
+   G_GNUC_WARN_UNUSED_RESULT;
 int qemuSetupMemoryDevicesCgroup(virDomainObjPtr vm,
                                  virDomainMemoryDefPtr mem);
 int qemuTeardownMemoryDevicesCgroup(virDomainObjPtr vm,
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 01a54d4265..282ab2c3ec 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -610,30 +610,30 @@ void qemuDomainEventEmitJobCompleted(virQEMUDriverPtr driver,
 int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
                           virDomainObjPtr obj,
                           qemuDomainJob job)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int qemuDomainObjBeginAgentJob(virQEMUDriverPtr driver,
                                virDomainObjPtr obj,
                                qemuDomainAgentJob agentJob)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int qemuDomainObjBeginJobWithAgent(virQEMUDriverPtr driver,
                                    virDomainObjPtr obj,
                                    qemuDomainJob job,
                                    qemuDomainAgentJob agentJob)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int qemuDomainObjBeginAsyncJob(virQEMUDriverPtr driver,
                                virDomainObjPtr obj,
                                qemuDomainAsyncJob asyncJob,
                                virDomainJobOperation operation,
                                unsigned long apiFlags)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int qemuDomainObjBeginNestedJob(virQEMUDriverPtr driver,
                                 virDomainObjPtr obj,
                                 qemuDomainAsyncJob asyncJob)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int qemuDomainObjBeginJobNowait(virQEMUDriverPtr driver,
                                 virDomainObjPtr obj,
                                 qemuDomainJob job)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void qemuDomainObjEndJob(virQEMUDriverPtr driver,
                          virDomainObjPtr obj);
@@ -662,11 +662,11 @@ void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
 int qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
                              virDomainObjPtr obj)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
                                    virDomainObjPtr obj,
                                    qemuDomainAsyncJob asyncJob)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 
 qemuAgentPtr qemuDomainObjEnterAgent(virDomainObjPtr obj)
@@ -679,7 +679,7 @@ void qemuDomainObjEnterRemote(virDomainObjPtr obj)
     ATTRIBUTE_NONNULL(1);
 int qemuDomainObjExitRemote(virDomainObjPtr obj,
                             bool checkActive)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 virDomainDefPtr qemuDomainDefCopy(virQEMUDriverPtr driver,
                                   virQEMUCapsPtr qemuCaps,
@@ -843,7 +843,7 @@ int qemuDomainDiskGetBackendAlias(virDomainDiskDefPtr disk,
                                   virQEMUCapsPtr qemuCaps,
                                   char **backendAlias)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
 
 int qemuDomainStorageSourceChainAccessAllow(virQEMUDriverPtr driver,
                                             virDomainObjPtr vm,
@@ -1172,7 +1172,7 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
                                 virStorageSourcePtr src,
                                 virQEMUDriverConfigPtr cfg,
                                 virQEMUCapsPtr qemuCaps)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 
 int
@@ -1220,4 +1220,4 @@ qemuDomainValidateActualNetDef(const virDomainNetDef *net,
 
 int
 qemuDomainSupportsCheckpointsBlockjobs(virDomainObjPtr vm)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/qemu/qemu_extdevice.h b/src/qemu/qemu_extdevice.h
index a035c9f638..5cf777ab4b 100644
--- a/src/qemu/qemu_extdevice.h
+++ b/src/qemu/qemu_extdevice.h
@@ -28,17 +28,17 @@ int qemuExtDeviceLogCommand(virQEMUDriverPtr driver,
                             virCommandPtr cmd,
                             const char *info)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int qemuExtDevicesPrepareDomain(virQEMUDriverPtr driver,
                                 virDomainObjPtr vm)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int qemuExtDevicesPrepareHost(virQEMUDriverPtr driver,
                               virDomainObjPtr vm)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void qemuExtDevicesCleanupHost(virQEMUDriverPtr driver,
                                virDomainDefPtr def)
@@ -48,7 +48,7 @@ int qemuExtDevicesStart(virQEMUDriverPtr driver,
                         virDomainObjPtr vm,
                         bool incomingMigration)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void qemuExtDevicesStop(virQEMUDriverPtr driver,
                         virDomainObjPtr vm)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index a98ec2d55a..d75b879a56 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -86,7 +86,7 @@ qemuMigrationJobStart(virQEMUDriverPtr driver,
                       virDomainObjPtr vm,
                       qemuDomainAsyncJob job,
                       unsigned long apiFlags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 static void
 qemuMigrationJobSetPhase(virQEMUDriverPtr driver,
diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h
index 188ccfa7fd..2daae65191 100644
--- a/src/qemu/qemu_migration.h
+++ b/src/qemu/qemu_migration.h
@@ -206,7 +206,7 @@ qemuMigrationSrcToFile(virQEMUDriverPtr driver,
                        int fd,
                        const char *compressor,
                        qemuDomainAsyncJob asyncJob)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 qemuMigrationSrcCancel(virQEMUDriverPtr driver,
diff --git a/src/qemu/qemu_tpm.h b/src/qemu/qemu_tpm.h
index d5a27592fc..3db0797fab 100644
--- a/src/qemu/qemu_tpm.h
+++ b/src/qemu/qemu_tpm.h
@@ -25,12 +25,12 @@
 int qemuExtTPMInitPaths(virQEMUDriverPtr driver,
                         virDomainDefPtr def)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int qemuExtTPMPrepareHost(virQEMUDriverPtr driver,
                           virDomainDefPtr def)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void qemuExtTPMCleanupHost(virDomainDefPtr def)
     ATTRIBUTE_NONNULL(1);
@@ -39,7 +39,7 @@ int qemuExtTPMStart(virQEMUDriverPtr driver,
                     virDomainObjPtr vm,
                     bool incomingMigration)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void qemuExtTPMStop(virQEMUDriverPtr driver,
                     virDomainObjPtr vm)
@@ -49,4 +49,4 @@ int qemuExtTPMSetupCgroup(virQEMUDriverPtr driver,
                           virDomainDefPtr def,
                           virCgroupPtr cgroup)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/qemu/qemu_vhost_user_gpu.h b/src/qemu/qemu_vhost_user_gpu.h
index 40a8567630..2c757fd8d1 100644
--- a/src/qemu/qemu_vhost_user_gpu.h
+++ b/src/qemu/qemu_vhost_user_gpu.h
@@ -27,13 +27,13 @@
 int qemuExtVhostUserGPUPrepareDomain(virQEMUDriverPtr driver,
                                      virDomainVideoDefPtr video)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int qemuExtVhostUserGPUStart(virQEMUDriverPtr driver,
                              virDomainObjPtr vm,
                              virDomainVideoDefPtr video)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void qemuExtVhostUserGPUStop(virQEMUDriverPtr driver,
                              virDomainObjPtr def,
@@ -46,4 +46,4 @@ qemuExtVhostUserGPUSetupCgroup(virQEMUDriverPtr driver,
                                virDomainVideoDefPtr video,
                                virCgroupPtr cgroup)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c
index 9fc5dc3998..8c9390c1d2 100644
--- a/src/remote/remote_daemon_dispatch.c
+++ b/src/remote/remote_daemon_dispatch.c
@@ -95,18 +95,18 @@ static virNWFilterBindingPtr get_nonnull_nwfilter_binding(virConnectPtr conn, re
 static virDomainCheckpointPtr get_nonnull_domain_checkpoint(virDomainPtr dom, remote_nonnull_domain_checkpoint checkpoint);
 static virDomainSnapshotPtr get_nonnull_domain_snapshot(virDomainPtr dom, remote_nonnull_domain_snapshot snapshot);
 static virNodeDevicePtr get_nonnull_node_device(virConnectPtr conn, remote_nonnull_node_device dev);
-static int make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_network_port(remote_nonnull_network_port *port_dst, virNetworkPortPtr port_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_interface(remote_nonnull_interface *interface_dst, virInterfacePtr interface_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_nwfilter(remote_nonnull_nwfilter *net_dst, virNWFilterPtr nwfilter_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_nwfilter_binding(remote_nonnull_nwfilter_binding *binding_dst, virNWFilterBindingPtr binding_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_domain_checkpoint(remote_nonnull_domain_checkpoint *checkpoint_dst, virDomainCheckpointPtr checkpoint_src) ATTRIBUTE_RETURN_CHECK;
-static int make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src) ATTRIBUTE_RETURN_CHECK;
+static int make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_network_port(remote_nonnull_network_port *port_dst, virNetworkPortPtr port_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_interface(remote_nonnull_interface *interface_dst, virInterfacePtr interface_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_nwfilter(remote_nonnull_nwfilter *net_dst, virNWFilterPtr nwfilter_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_nwfilter_binding(remote_nonnull_nwfilter_binding *binding_dst, virNWFilterBindingPtr binding_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_domain_checkpoint(remote_nonnull_domain_checkpoint *checkpoint_dst, virDomainCheckpointPtr checkpoint_src) G_GNUC_WARN_UNUSED_RESULT;
+static int make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src) G_GNUC_WARN_UNUSED_RESULT;
 
 static int
 remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr errors,
diff --git a/src/rpc/virnetmessage.h b/src/rpc/virnetmessage.h
index 748421a9fd..94c2947974 100644
--- a/src/rpc/virnetmessage.h
+++ b/src/rpc/virnetmessage.h
@@ -66,20 +66,20 @@ void virNetMessageQueuePush(virNetMessagePtr *queue,
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
 int virNetMessageEncodeHeader(virNetMessagePtr msg)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetMessageDecodeLength(virNetMessagePtr msg)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetMessageDecodeHeader(virNetMessagePtr msg)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetMessageEncodePayload(virNetMessagePtr msg,
                                xdrproc_t filter,
                                void *data)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetMessageDecodePayload(virNetMessagePtr msg,
                                xdrproc_t filter,
                                void *data)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetMessageEncodeNumFDs(virNetMessagePtr msg);
 int virNetMessageDecodeNumFDs(virNetMessagePtr msg);
@@ -87,9 +87,9 @@ int virNetMessageDecodeNumFDs(virNetMessagePtr msg);
 int virNetMessageEncodePayloadRaw(virNetMessagePtr msg,
                                   const char *buf,
                                   size_t len)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetMessageEncodePayloadEmpty(virNetMessagePtr msg)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 void virNetMessageSaveError(virNetMessageErrorPtr rerr)
     ATTRIBUTE_NONNULL(1);
diff --git a/src/secret/secret_util.h b/src/secret/secret_util.h
index 4fe8f98aa5..ff23df63b7 100644
--- a/src/secret/secret_util.h
+++ b/src/secret/secret_util.h
@@ -30,4 +30,4 @@ int virSecretGetSecretString(virConnectPtr conn,
                              uint8_t **ret_secret,
                              size_t *ret_secret_size)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/storage/storage_driver.h b/src/storage/storage_driver.h
index 64b3d8bbf8..7d82871852 100644
--- a/src/storage/storage_driver.h
+++ b/src/storage/storage_driver.h
@@ -36,7 +36,7 @@ storagePoolLookupByTargetPath(virConnectPtr conn,
 
 char *virStoragePoolObjBuildTempFilePath(virStoragePoolObjPtr obj,
                                          virStorageVolDefPtr voldef)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int storageRegister(void);
 int storageRegisterAll(void);
diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h
index 705e23631d..18c4cf85f3 100644
--- a/src/storage/storage_util.h
+++ b/src/storage/storage_util.h
@@ -147,7 +147,7 @@ enum {
 
 int virStorageBackendVolOpen(const char *path, struct stat *sb,
                              unsigned int flags)
-    ATTRIBUTE_RETURN_CHECK
+    G_GNUC_WARN_UNUSED_RESULT
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
 #define VIR_STORAGE_DEFAULT_POOL_PERM_MODE 0711
diff --git a/src/util/viralloc.h b/src/util/viralloc.h
index 49bf2b86e7..c503bbe19b 100644
--- a/src/util/viralloc.h
+++ b/src/util/viralloc.h
@@ -54,26 +54,26 @@
 
 /* Don't call these directly - use the macros below */
 int virAlloc(void *ptrptr, size_t size)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
 int virAllocN(void *ptrptr, size_t size, size_t count)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
 int virReallocN(void *ptrptr, size_t size, size_t count)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
 int virExpandN(void *ptrptr, size_t size, size_t *count, size_t add)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int virResizeN(void *ptrptr, size_t size, size_t *alloc, size_t count, size_t desired)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 void virShrinkN(void *ptrptr, size_t size, size_t *count, size_t toremove)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int virInsertElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
                        size_t add, void *newelem,
                        bool clearOriginal, bool inPlace)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
 int virDeleteElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
                        size_t toremove, bool inPlace)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
 int virAllocVar(void *ptrptr, size_t struct_size, size_t element_size, size_t count)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
 void virFree(void *ptrptr) ATTRIBUTE_NONNULL(1);
 
 void virDispose(void *ptrptr, size_t count, size_t element_size, size_t *countptr)
diff --git a/src/util/virbitmap.h b/src/util/virbitmap.h
index 46696e0c70..8d700c88c5 100644
--- a/src/util/virbitmap.h
+++ b/src/util/virbitmap.h
@@ -33,9 +33,9 @@ typedef virBitmap *virBitmapPtr;
 /*
  * Allocate a bitmap capable of containing @size bits.
  */
-virBitmapPtr virBitmapNewQuiet(size_t size) ATTRIBUTE_RETURN_CHECK;
-virBitmapPtr virBitmapNew(size_t size) ATTRIBUTE_RETURN_CHECK;
-virBitmapPtr virBitmapNewEmpty(void) ATTRIBUTE_RETURN_CHECK;
+virBitmapPtr virBitmapNewQuiet(size_t size) G_GNUC_WARN_UNUSED_RESULT;
+virBitmapPtr virBitmapNew(size_t size) G_GNUC_WARN_UNUSED_RESULT;
+virBitmapPtr virBitmapNewEmpty(void) G_GNUC_WARN_UNUSED_RESULT;
 
 /*
  * Free previously allocated bitmap
@@ -52,38 +52,38 @@ int virBitmapCopy(virBitmapPtr dst, virBitmapPtr src);
  * Set bit position @b in @bitmap
  */
 int virBitmapSetBit(virBitmapPtr bitmap, size_t b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virBitmapSetBitExpand(virBitmapPtr bitmap, size_t b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 
 /*
  * Clear bit position @b in @bitmap
  */
 int virBitmapClearBit(virBitmapPtr bitmap, size_t b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virBitmapClearBitExpand(virBitmapPtr bitmap, size_t b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 /*
  * Get bit @b in @bitmap. Returns false if b is out of range.
  */
 bool virBitmapIsBitSet(virBitmapPtr bitmap, size_t b)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 /*
  * Get setting of bit position @b in @bitmap and store in @result
  */
 int virBitmapGetBit(virBitmapPtr bitmap, size_t b, bool *result)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
 
 virBitmapPtr
 virBitmapNewString(const char *string)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virBitmapToString(virBitmapPtr bitmap, bool prefix, bool trim)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virBitmapFormat(virBitmapPtr bitmap);
 
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index 632d02bc71..6bc1ef87b0 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -33,9 +33,9 @@ typedef virCommand *virCommandPtr;
  * call any function that is not async-signal-safe.  */
 typedef int (*virExecHook)(void *data);
 
-pid_t virFork(void) ATTRIBUTE_RETURN_CHECK;
+pid_t virFork(void) G_GNUC_WARN_UNUSED_RESULT;
 
-int virRun(const char *const*argv, int *status) ATTRIBUTE_RETURN_CHECK;
+int virRun(const char *const*argv, int *status) G_GNUC_WARN_UNUSED_RESULT;
 
 virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1);
 
@@ -172,26 +172,26 @@ void virCommandSetPreExecHook(virCommandPtr cmd,
 void virCommandWriteArgLog(virCommandPtr cmd,
                            int logfd);
 
-char *virCommandToString(virCommandPtr cmd, bool linebreaks) ATTRIBUTE_RETURN_CHECK;
+char *virCommandToString(virCommandPtr cmd, bool linebreaks) G_GNUC_WARN_UNUSED_RESULT;
 
-int virCommandExec(virCommandPtr cmd, gid_t *groups, int ngroups) ATTRIBUTE_RETURN_CHECK;
+int virCommandExec(virCommandPtr cmd, gid_t *groups, int ngroups) G_GNUC_WARN_UNUSED_RESULT;
 
 int virCommandRun(virCommandPtr cmd,
-                  int *exitstatus) ATTRIBUTE_RETURN_CHECK;
+                  int *exitstatus) G_GNUC_WARN_UNUSED_RESULT;
 
 int virCommandRunAsync(virCommandPtr cmd,
-                       pid_t *pid) ATTRIBUTE_RETURN_CHECK;
+                       pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;
 
 int virCommandWait(virCommandPtr cmd,
-                   int *exitstatus) ATTRIBUTE_RETURN_CHECK;
+                   int *exitstatus) G_GNUC_WARN_UNUSED_RESULT;
 
 void virCommandRequireHandshake(virCommandPtr cmd);
 
 int virCommandHandshakeWait(virCommandPtr cmd)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virCommandHandshakeNotify(virCommandPtr cmd)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void virCommandAbort(virCommandPtr cmd);
 
diff --git a/src/util/vircrypto.h b/src/util/vircrypto.h
index 826169276e..bf002d42d5 100644
--- a/src/util/vircrypto.h
+++ b/src/util/vircrypto.h
@@ -45,14 +45,14 @@ virCryptoHashBuf(virCryptoHash hash,
                  const char *input,
                  unsigned char *output)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virCryptoHashString(virCryptoHash hash,
                     const char *input,
                     char **output)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 bool virCryptoHaveCipher(virCryptoCipher algorithm);
 
@@ -62,4 +62,4 @@ int virCryptoEncryptData(virCryptoCipher algorithm,
                          uint8_t *data, size_t datalen,
                          uint8_t **ciphertext, size_t *ciphertextlen)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6)
-    ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virfile.h b/src/util/virfile.h
index f22380550c..a66e3569a3 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -37,19 +37,19 @@ typedef enum {
     VIR_FILE_CLOSE_DONT_LOG = 1 << 2,
 } virFileCloseFlags;
 
-ssize_t saferead(int fd, void *buf, size_t count) ATTRIBUTE_RETURN_CHECK;
+ssize_t saferead(int fd, void *buf, size_t count) G_GNUC_WARN_UNUSED_RESULT;
 ssize_t safewrite(int fd, const void *buf, size_t count)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int safezero(int fd, off_t offset, off_t len)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virFileAllocate(int fd, off_t offset, off_t len)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 /* Don't call these directly - use the macros below */
 int virFileClose(int *fdptr, virFileCloseFlags flags)
-        ATTRIBUTE_RETURN_CHECK;
-int virFileFclose(FILE **file, bool preserve_errno) ATTRIBUTE_RETURN_CHECK;
-FILE *virFileFdopen(int *fdptr, const char *mode) ATTRIBUTE_RETURN_CHECK;
+        G_GNUC_WARN_UNUSED_RESULT;
+int virFileFclose(FILE **file, bool preserve_errno) G_GNUC_WARN_UNUSED_RESULT;
+FILE *virFileFdopen(int *fdptr, const char *mode) G_GNUC_WARN_UNUSED_RESULT;
 
 static inline void virForceCloseHelper(int *fd)
 {
@@ -107,7 +107,7 @@ typedef enum {
 virFileWrapperFdPtr virFileWrapperFdNew(int *fd,
                                         const char *name,
                                         unsigned int flags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virFileWrapperFdClose(virFileWrapperFdPtr dfd);
 
@@ -146,20 +146,20 @@ int virFileNBDDeviceAssociate(const char *file,
 int virFileDeleteTree(const char *dir);
 
 int virFileReadHeaderFD(int fd, int maxlen, char **buf)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(3);
 int virFileReadHeaderQuiet(const char *path, int maxlen, char **buf)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int virFileReadLimFD(int fd, int maxlen, char **buf)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(3);
 int virFileReadAll(const char *path, int maxlen, char **buf)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int virFileReadAllQuiet(const char *path, int maxlen, char **buf)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
 int virFileReadBufQuiet(const char *file, char *buf, int len)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 
 int virFileWriteStr(const char *path, const char *str, mode_t mode)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virFileLinkPointsTo(const char *checkLink,
                         const char *checkDest)
@@ -170,15 +170,15 @@ int virFileRelLinkPointsTo(const char *directory,
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
 
 int virFileResolveLink(const char *linkpath,
-                       char **resultpath) ATTRIBUTE_RETURN_CHECK;
+                       char **resultpath) G_GNUC_WARN_UNUSED_RESULT;
 int virFileResolveAllLinks(const char *linkpath,
-                           char **resultpath) ATTRIBUTE_RETURN_CHECK;
+                           char **resultpath) G_GNUC_WARN_UNUSED_RESULT;
 
 int virFileIsLink(const char *linkpath)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virFileReadLink(const char *linkpath, char **resultpath)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virFindFileInPath(const char *file);
 
@@ -219,16 +219,16 @@ int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
 int virFileIsSharedFS(const char *path) ATTRIBUTE_NONNULL(1);
 int virFileIsMountPoint(const char *file) ATTRIBUTE_NONNULL(1);
 int virFileIsCDROM(const char *path)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virFileGetMountSubtree(const char *mtabpath,
                            const char *prefix,
                            char ***mountsret,
-                           size_t *nmountsret) ATTRIBUTE_RETURN_CHECK;
+                           size_t *nmountsret) G_GNUC_WARN_UNUSED_RESULT;
 int virFileGetMountReverseSubtree(const char *mtabpath,
                                   const char *prefix,
                                   char ***mountsret,
-                                  size_t *nmountsret) ATTRIBUTE_RETURN_CHECK;
+                                  size_t *nmountsret) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virFileSanitizePath(const char *path);
 char *virFileCanonicalizePath(const char *path) ATTRIBUTE_NOINLINE;
@@ -242,15 +242,15 @@ enum {
 };
 int virFileAccessibleAs(const char *path, int mode,
                         uid_t uid, gid_t gid)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virFileOpenAs(const char *path, int openflags, mode_t mode,
                   uid_t uid, gid_t gid,
                   unsigned int flags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virFileRemove(const char *path, uid_t uid, gid_t gid);
 
 int virFileChownFiles(const char *name, uid_t uid, gid_t gid)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 enum {
     VIR_DIR_CREATE_NONE        = 0,
@@ -258,27 +258,27 @@ enum {
     VIR_DIR_CREATE_ALLOW_EXIST = (1 << 1),
 };
 int virDirCreate(const char *path, mode_t mode, uid_t uid, gid_t gid,
-                 unsigned int flags) ATTRIBUTE_RETURN_CHECK;
+                 unsigned int flags) G_GNUC_WARN_UNUSED_RESULT;
 int virDirOpen(DIR **dirp, const char *dirname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virDirOpenIfExists(DIR **dirp, const char *dirname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virDirOpenQuiet(DIR **dirp, const char *dirname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virDirRead(DIR *dirp, struct dirent **ent, const char *dirname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 void virDirClose(DIR **dirp)
     ATTRIBUTE_NONNULL(1);
 #define VIR_DIR_CLOSE(dir)  virDirClose(&(dir))
 
-int virFileMakePath(const char *path) ATTRIBUTE_RETURN_CHECK;
+int virFileMakePath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
 int virFileMakePathWithMode(const char *path,
-                            mode_t mode) ATTRIBUTE_RETURN_CHECK;
-int virFileMakeParentPath(const char *path) ATTRIBUTE_RETURN_CHECK;
+                            mode_t mode) G_GNUC_WARN_UNUSED_RESULT;
+int virFileMakeParentPath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virFileBuildPath(const char *dir,
                        const char *name,
-                       const char *ext) ATTRIBUTE_RETURN_CHECK;
+                       const char *ext) G_GNUC_WARN_UNUSED_RESULT;
 
 
 #ifdef WIN32
@@ -304,7 +304,7 @@ char *virFileBuildPath(const char *dir,
 
 bool virFileIsAbsPath(const char *path);
 int virFileAbsPath(const char *path,
-                   char **abspath) ATTRIBUTE_RETURN_CHECK;
+                   char **abspath) G_GNUC_WARN_UNUSED_RESULT;
 const char *virFileSkipRoot(const char *path);
 void virFileRemoveLastComponent(char *path);
 
diff --git a/src/util/viriptables.h b/src/util/viriptables.h
index feea988acd..de26956178 100644
--- a/src/util/viriptables.h
+++ b/src/util/viriptables.h
@@ -59,38 +59,38 @@ int              iptablesAddForwardAllowOut      (virFirewallPtr fw,
                                                   unsigned int prefix,
                                                   const char *iface,
                                                   const char *physdev)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesRemoveForwardAllowOut   (virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
                                                   const char *iface,
                                                   const char *physdev)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesAddForwardAllowRelatedIn(virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
                                                   const char *iface,
                                                   const char *physdev)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesRemoveForwardAllowRelatedIn(virFirewallPtr fw,
                                                      virSocketAddr *netaddr,
                                                      unsigned int prefix,
                                                      const char *iface,
                                                      const char *physdev)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int              iptablesAddForwardAllowIn       (virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
                                                   const char *iface,
                                                   const char *physdev)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesRemoveForwardAllowIn    (virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
                                                   const char *iface,
                                                   const char *physdev)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 void             iptablesAddForwardAllowCross    (virFirewallPtr fw,
                                                   virFirewallLayer layer,
@@ -120,7 +120,7 @@ int              iptablesAddForwardMasquerade    (virFirewallPtr fw,
                                                   virSocketAddrRangePtr addr,
                                                   virPortRangePtr port,
                                                   const char *protocol)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesRemoveForwardMasquerade (virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
@@ -128,19 +128,19 @@ int              iptablesRemoveForwardMasquerade (virFirewallPtr fw,
                                                   virSocketAddrRangePtr addr,
                                                   virPortRangePtr port,
                                                   const char *protocol)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesAddDontMasquerade       (virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
                                                   const char *physdev,
                                                   const char *destaddr)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int              iptablesRemoveDontMasquerade    (virFirewallPtr fw,
                                                   virSocketAddr *netaddr,
                                                   unsigned int prefix,
                                                   const char *physdev,
                                                   const char *destaddr)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 void             iptablesAddOutputFixUdpChecksum (virFirewallPtr fw,
                                                   const char *iface,
                                                   int port);
diff --git a/src/util/viriscsi.h b/src/util/viriscsi.h
index 6eddb504a2..6d17d139eb 100644
--- a/src/util/viriscsi.h
+++ b/src/util/viriscsi.h
@@ -33,18 +33,18 @@ virISCSIConnectionLogin(const char *portal,
                         const char *initiatoriqn,
                         const char *target)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virISCSIConnectionLogout(const char *portal,
                          const char *initiatoriqn,
                          const char *target)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virISCSIRescanLUNs(const char *session)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virISCSIScanTargets(const char *portal,
@@ -52,13 +52,13 @@ virISCSIScanTargets(const char *portal,
                     bool persist,
                     size_t *ntargetsret,
                     char ***targetsret)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virISCSINodeNew(const char *portal,
                 const char *target)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virISCSINodeUpdate(const char *portal,
@@ -66,4 +66,4 @@ virISCSINodeUpdate(const char *portal,
                    const char *name,
                    const char *value)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virjson.h b/src/util/virjson.h
index 65b8d5620a..b1d0d0e741 100644
--- a/src/util/virjson.h
+++ b/src/util/virjson.h
@@ -147,7 +147,7 @@ char *virJSONValueToString(virJSONValuePtr object,
 int virJSONValueToBuffer(virJSONValuePtr object,
                          virBufferPtr buf,
                          bool pretty)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 typedef int (*virJSONValueObjectIteratorFunc)(const char *key,
                                               virJSONValuePtr value,
diff --git a/src/util/virkeyfile.h b/src/util/virkeyfile.h
index 4cae4331fc..4fdac0daf7 100644
--- a/src/util/virkeyfile.h
+++ b/src/util/virkeyfile.h
@@ -33,13 +33,13 @@ virKeyFilePtr virKeyFileNew(void);
 
 int virKeyFileLoadFile(virKeyFilePtr conf,
                        const char *filename)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virKeyFileLoadData(virKeyFilePtr conf,
                        const char *filename,
                        const char *data,
                        size_t len)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 void virKeyFileFree(virKeyFilePtr conf);
 
diff --git a/src/util/virmacaddr.h b/src/util/virmacaddr.h
index 55cfd12164..cf26a8bbfa 100644
--- a/src/util/virmacaddr.h
+++ b/src/util/virmacaddr.h
@@ -54,10 +54,10 @@ const char *virMacAddrFormat(const virMacAddr *addr,
 void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
                         virMacAddrPtr addr) ATTRIBUTE_NOINLINE;
 int virMacAddrParse(const char* str,
-                    virMacAddrPtr addr) ATTRIBUTE_RETURN_CHECK;
+                    virMacAddrPtr addr) G_GNUC_WARN_UNUSED_RESULT;
 int virMacAddrParseHex(const char* str,
                        virMacAddrPtr addr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 bool virMacAddrIsUnicast(const virMacAddr *addr);
 bool virMacAddrIsMulticast(const virMacAddr *addr);
 bool virMacAddrIsBroadcastRaw(const unsigned char s[VIR_MAC_BUFLEN]);
diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index 6ff98487cb..ff8df31a37 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -147,87 +147,87 @@ struct _virNetDevCoalesce {
 
 int virNetDevSetupControl(const char *ifname,
                           virIfreq *ifr)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevExists(const char *brname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 int virNetDevSetOnline(const char *ifname,
                        bool online)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 int virNetDevGetOnline(const char *ifname,
                       bool *online)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 
 int virNetDevSetMAC(const char *ifname,
                     const virMacAddr *macaddr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 int virNetDevGetMAC(const char *ifname,
                     virMacAddrPtr macaddr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevReplaceMacAddress(const char *linkdev,
                                const virMacAddr *macaddress,
                                const char *stateDir)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevRestoreMacAddress(const char *linkdev,
                                const char *stateDir)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevSetCoalesce(const char *ifname,
                          virNetDevCoalescePtr coalesce,
                          bool update)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevSetMTU(const char *ifname,
                     int mtu)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevSetMTUFromDevice(const char *ifname,
                               const char *otherifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevGetMTU(const char *ifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevSetNamespace(const char *ifname, pid_t pidInNs)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevSetName(const char *ifname, const char *newifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virNetDevGetName(int ifindex)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevGetIndex(const char *ifname, int *ifindex)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetVLanID(const char *ifname, int *vlanid)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetMaster(const char *ifname, char **master)
-   ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+   ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevValidateConfig(const char *ifname,
                             const virMacAddr *macaddr, int ifindex)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevIsVirtualFunction(const char *ifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetVirtualFunctionIndex(const char *pfname, const char *vfname,
                                      int *vf_index)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetPhysicalFunction(const char *ifname, char **pfname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevPFGetVF(const char *pfname, int vf, char **vfname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetPhysPortID(const char *ifname,
                            char **physPortID)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetVirtualFunctions(const char *pfname,
                                  char ***vfname,
@@ -235,12 +235,12 @@ int virNetDevGetVirtualFunctions(const char *pfname,
                                  size_t *n_vfname,
                                  unsigned int *max_vfs)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevSaveNetConfig(const char *linkdev, int vf,
                            const char *stateDir,
                            bool saveVlan)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virNetDevReadNetConfig(const char *linkdev, int vf,
@@ -249,7 +249,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf,
                        virNetDevVlanPtr *vlan,
                        virMacAddrPtr *MAC)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
-   ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6) ATTRIBUTE_RETURN_CHECK;
+   ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virNetDevSetNetConfig(const char *linkdev, int vf,
@@ -257,7 +257,7 @@ virNetDevSetNetConfig(const char *linkdev, int vf,
                       virNetDevVlanPtr vlan,
                       const virMacAddr *MAC,
                       bool setVLan)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetVirtualFunctionInfo(const char *vfname, char **pfname,
                                     int *vf)
@@ -265,40 +265,40 @@ int virNetDevGetVirtualFunctionInfo(const char *vfname, char **pfname,
 
 int virNetDevGetFeatures(const char *ifname,
                          virBitmapPtr *out)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevGetLinkInfo(const char *ifname,
                          virNetDevIfLinkPtr lnk)
     ATTRIBUTE_NONNULL(1);
 
 virNetDevRxFilterPtr virNetDevRxFilterNew(void)
-   ATTRIBUTE_RETURN_CHECK;
+   G_GNUC_WARN_UNUSED_RESULT;
 void virNetDevRxFilterFree(virNetDevRxFilterPtr filter);
 int virNetDevGetRxFilter(const char *ifname,
                          virNetDevRxFilterPtr *filter)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevAddMulti(const char *ifname,
                       virMacAddrPtr macaddr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevDelMulti(const char *ifname,
                       virMacAddrPtr macaddr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevSetPromiscuous(const char *ifname, bool promiscuous)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevGetPromiscuous(const char *ifname, bool *promiscuous)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevSetRcvMulti(const char *ifname, bool receive)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevGetRcvMulti(const char *ifname, bool *receive)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevSetRcvAllMulti(const char *ifname, bool receive)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevGetRcvAllMulti(const char *ifname, bool *receive)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 #define SYSFS_NET_DIR "/sys/class/net/"
 #define SYSFS_INFINIBAND_DIR "/sys/class/infiniband/"
@@ -306,7 +306,7 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link,
                        const char *ifname,
                        const char *file)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 int virNetDevRunEthernetScript(const char *ifname, const char *script)
     ATTRIBUTE_NOINLINE;
diff --git a/src/util/virnetdevbandwidth.h b/src/util/virnetdevbandwidth.h
index 75da1f7ba6..19323c5ed2 100644
--- a/src/util/virnetdevbandwidth.h
+++ b/src/util/virnetdevbandwidth.h
@@ -42,11 +42,11 @@ int virNetDevBandwidthSet(const char *ifname,
                           virNetDevBandwidthPtr bandwidth,
                           bool hierarchical_class,
                           bool swapped)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBandwidthClear(const char *ifname);
 int virNetDevBandwidthCopy(virNetDevBandwidthPtr *dest,
                            const virNetDevBandwidth *src)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 bool virNetDevBandwidthEqual(virNetDevBandwidthPtr a, virNetDevBandwidthPtr b);
 
@@ -56,20 +56,20 @@ int virNetDevBandwidthPlug(const char *brname,
                            virNetDevBandwidthPtr bandwidth,
                            unsigned int id)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBandwidthUnplug(const char *brname,
                              unsigned int id)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBandwidthUpdateRate(const char *ifname,
                                  unsigned int id,
                                  virNetDevBandwidthPtr bandwidth,
                                  unsigned long long new_rate)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBandwidthUpdateFilter(const char *ifname,
                                    const virMacAddr *ifmac_ptr,
                                    unsigned int id)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevbridge.h b/src/util/virnetdevbridge.h
index 8df5e51c2e..88284d6bed 100644
--- a/src/util/virnetdevbridge.h
+++ b/src/util/virnetdevbridge.h
@@ -22,56 +22,56 @@
 #include "virmacaddr.h"
 
 int virNetDevBridgeCreate(const char *brname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgeDelete(const char *brname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBridgeAddPort(const char *brname,
                            const char *ifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBridgeRemovePort(const char *brname,
                               const char *ifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBridgeSetSTPDelay(const char *brname,
                                int delay)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgeGetSTPDelay(const char *brname,
                                int *delay)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgeSetSTP(const char *brname,
                           bool enable)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgeGetSTP(const char *brname,
                           bool *enable)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBridgeSetVlanFiltering(const char *brname,
                                     bool enable)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgeGetVlanFiltering(const char *brname,
                                     bool *enable)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevBridgePortGetLearning(const char *brname,
                                    const char *ifname,
                                    bool *enable)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgePortSetLearning(const char *brname,
                                    const char *ifname,
                                    bool enable)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgePortGetUnicastFlood(const char *brname,
                                        const char *ifname,
                                        bool *enable)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgePortSetUnicastFlood(const char *brname,
                                        const char *ifname,
                                        bool enable)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 typedef enum {
     VIR_NETDEVBRIDGE_FDB_FLAG_ROUTER    = (1 << 0),
@@ -84,7 +84,7 @@ typedef enum {
 
 int virNetDevBridgeFDBAdd(const virMacAddr *mac, const char *ifname,
                           unsigned int flags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevBridgeFDBDel(const virMacAddr *mac, const char *ifname,
                           unsigned int flags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h
index 9fa5f446b0..43271f827b 100644
--- a/src/util/virnetdevip.h
+++ b/src/util/virnetdevip.h
@@ -63,20 +63,20 @@ int virNetDevIPAddrAdd(const char *ifname,
                        virSocketAddr *addr,
                        virSocketAddr *peer,
                        unsigned int prefix)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 int virNetDevIPRouteAdd(const char *ifname,
                         virSocketAddrPtr addr,
                         unsigned int prefix,
                         virSocketAddrPtr gateway,
                         unsigned int metric)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevIPAddrDel(const char *ifname,
                        virSocketAddr *addr,
                        unsigned int prefix)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevIPAddrGet(const char *ifname, virSocketAddrPtr addr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevIPWaitDadFinish(virSocketAddrPtr *addrs, size_t count)
     ATTRIBUTE_NONNULL(1);
 bool virNetDevIPCheckIPv6Forwarding(void);
diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h
index 24b17b4bd0..4c153dfb5c 100644
--- a/src/util/virnetdevmacvlan.h
+++ b/src/util/virnetdevmacvlan.h
@@ -58,7 +58,7 @@ int virNetDevMacVLanReserveName(const char *name, bool quietfail);
 int virNetDevMacVLanReleaseName(const char *name);
 
 bool virNetDevMacVLanIsMacvtap(const char *ifname)
-   ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+   ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 int virNetDevMacVLanCreate(const char *ifname,
                            const char *type,
@@ -67,10 +67,10 @@ int virNetDevMacVLanCreate(const char *ifname,
                            uint32_t macvlan_mode,
                            int *retry)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanDelete(const char *ifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
                                            const virMacAddr *macaddress,
@@ -86,16 +86,16 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
                                            size_t tapfdSize,
                                            unsigned int flags)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
-    ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanTapOpen(const char *ifname,
                             int *tapfd,
                             size_t tapfdSize)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
-   ATTRIBUTE_RETURN_CHECK;
+   G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanTapSetup(int *tapfd, size_t tapfdSize, bool vnet_hdr)
-   ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+   ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
                                            const virMacAddr *macaddress,
@@ -104,7 +104,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
                                            virNetDevVPortProfilePtr virtPortProfile,
                                            char *stateDir)
     ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_NONNULL(6) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(6) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname,
                                             const virMacAddr *macaddress,
@@ -113,7 +113,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname,
                                             virNetDevVPortProfilePtr virtPortProfile,
                                             virNetDevVPortProfileOp vmOp)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname,
                                                  const virMacAddr *macaddress,
@@ -122,4 +122,4 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname,
                                                  virNetDevVPortProfilePtr virtPortProfile,
                                                  virNetDevVPortProfileOp vmOp)
 ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevmidonet.h b/src/util/virnetdevmidonet.h
index aa7fe49103..61927c3edd 100644
--- a/src/util/virnetdevmidonet.h
+++ b/src/util/virnetdevmidonet.h
@@ -24,7 +24,7 @@
 
 int virNetDevMidonetBindPort(const char *ifname,
                              virNetDevVPortProfilePtr virtualport)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevMidonetUnbindPort(virNetDevVPortProfilePtr virtualport)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h
index 5bc18f851f..b70ee7a559 100644
--- a/src/util/virnetdevopenvswitch.h
+++ b/src/util/virnetdevopenvswitch.h
@@ -35,35 +35,35 @@ int virNetDevOpenvswitchAddPort(const char *brname,
                                 virNetDevVPortProfilePtr ovsport,
                                 virNetDevVlanPtr virtVlan)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchRemovePort(const char *brname, const char *ifname)
-    ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchSetMigrateData(char *migrate, const char *ifname)
-    ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchInterfaceParseStats(const char *json,
                                             virDomainInterfaceStatsPtr stats)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchInterfaceStats(const char *ifname,
                                        virDomainInterfaceStatsPtr stats)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
                                            char **ifname)
-    ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 int virNetDevOpenvswitchUpdateVlan(const char *ifname,
                                    virNetDevVlanPtr virtVlan)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h
index ec5789959a..36c2be777e 100644
--- a/src/util/virnetdevtap.h
+++ b/src/util/virnetdevtap.h
@@ -34,17 +34,17 @@ int virNetDevTapCreate(char **ifname,
                        int *tapfd,
                        size_t tapfdSize,
                        unsigned int flags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 int virNetDevTapDelete(const char *ifname,
                        const char *tunpath)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevTapGetName(int tapfd, char **ifname)
-    ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 char* virNetDevTapGetRealDeviceName(char *ifname)
-      ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+      ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 typedef enum {
    VIR_NETDEV_TAP_CREATE_NONE = 0,
@@ -68,7 +68,7 @@ virNetDevTapAttachBridge(const char *tapname,
                          unsigned int mtu,
                          unsigned int *actualMTU)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virNetDevTapReattachBridge(const char *tapname,
@@ -80,7 +80,7 @@ virNetDevTapReattachBridge(const char *tapname,
                            unsigned int mtu,
                            unsigned int *actualMTU)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevTapCreateInBridgePort(const char *brname,
                                    char **ifname,
@@ -96,9 +96,9 @@ int virNetDevTapCreateInBridgePort(const char *brname,
                                    unsigned int *actualMTU,
                                    unsigned int flags)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 
 int virNetDevTapInterfaceStats(const char *ifname,
                                virDomainInterfaceStatsPtr stats,
                                bool swapped)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevveth.h b/src/util/virnetdevveth.h
index 4380b7cfe1..830b37d046 100644
--- a/src/util/virnetdevveth.h
+++ b/src/util/virnetdevveth.h
@@ -23,6 +23,6 @@
 
 /* Function declarations */
 int virNetDevVethCreate(char **veth1, char **veth2)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 int virNetDevVethDelete(const char *veth)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetdevvportprofile.h b/src/util/virnetdevvportprofile.h
index d1db8bac6a..5fdd019a09 100644
--- a/src/util/virnetdevvportprofile.h
+++ b/src/util/virnetdevvportprofile.h
@@ -99,7 +99,7 @@ int virNetDevVPortProfileAssociate(const char *ifname,
                                    const unsigned char *vmuuid,
                                    virNetDevVPortProfileOp vmOp,
                                    bool setlink_only)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevVPortProfileDisassociate(const char *ifname,
                                       const virNetDevVPortProfile *virtPort,
@@ -107,4 +107,4 @@ int virNetDevVPortProfileDisassociate(const char *ifname,
                                       const char *linkdev,
                                       int vf,
                                       virNetDevVPortProfileOp vmOp)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h
index 6419a775e1..a7e455769d 100644
--- a/src/util/virnetlink.h
+++ b/src/util/virnetlink.h
@@ -109,7 +109,7 @@ int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen);
 int virNetlinkDumpLink(const char *ifname, int ifindex,
                        void **nlData, struct nlattr **tb,
                        uint32_t src_pid, uint32_t dst_pid)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int
 virNetlinkGetNeighbor(void **nlData, uint32_t src_pid, uint32_t dst_pid);
 
diff --git a/src/util/virpci.h b/src/util/virpci.h
index f3226f1f1b..017545424d 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -228,7 +228,7 @@ int virPCIGetNetName(const char *device_link_sysfs_path,
 
 int virPCIGetSysfsFile(char *virPCIDeviceName,
                              char **pci_sysfs_device_link)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 bool virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
                                 bool report);
diff --git a/src/util/virpidfile.h b/src/util/virpidfile.h
index a42b82ff1d..370a59892e 100644
--- a/src/util/virpidfile.h
+++ b/src/util/virpidfile.h
@@ -30,24 +30,24 @@ char *virPidFileBuildPath(const char *dir,
                           const char *name);
 
 int virPidFileWritePath(const char *path,
-                        pid_t pid) ATTRIBUTE_RETURN_CHECK;
+                        pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
 int virPidFileWrite(const char *dir,
                     const char *name,
-                    pid_t pid) ATTRIBUTE_RETURN_CHECK;
+                    pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
 
 int virPidFileReadPath(const char *path,
-                       pid_t *pid) ATTRIBUTE_RETURN_CHECK;
+                       pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;
 int virPidFileRead(const char *dir,
                    const char *name,
-                   pid_t *pid) ATTRIBUTE_RETURN_CHECK;
+                   pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;
 
 int virPidFileReadPathIfAlive(const char *path,
                               pid_t *pid,
-                              const char *binpath) ATTRIBUTE_RETURN_CHECK;
+                              const char *binpath) G_GNUC_WARN_UNUSED_RESULT;
 int virPidFileReadIfAlive(const char *dir,
                           const char *name,
                           pid_t *pid,
-                          const char *binpath) ATTRIBUTE_RETURN_CHECK;
+                          const char *binpath) G_GNUC_WARN_UNUSED_RESULT;
 
 int virPidFileDeletePath(const char *path);
 int virPidFileDelete(const char *dir,
@@ -56,11 +56,11 @@ int virPidFileDelete(const char *dir,
 
 int virPidFileAcquirePath(const char *path,
                           bool waitForLock,
-                          pid_t pid) ATTRIBUTE_RETURN_CHECK;
+                          pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
 int virPidFileAcquire(const char *dir,
                       const char *name,
                       bool waitForLock,
-                      pid_t pid) ATTRIBUTE_RETURN_CHECK;
+                      pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
 
 int virPidFileReleasePath(const char *path,
                           int fd);
diff --git a/src/util/virprocess.h b/src/util/virprocess.h
index 8e2af33c7d..b2a3a0a7a6 100644
--- a/src/util/virprocess.h
+++ b/src/util/virprocess.h
@@ -50,7 +50,7 @@ void virProcessExitWithStatus(int status) G_GNUC_NORETURN;
 
 int
 virProcessWait(pid_t pid, int *exitstatus, bool raw)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virProcessKill(pid_t pid, int sig);
 
diff --git a/src/util/virrandom.h b/src/util/virrandom.h
index c33932e8b3..60f9aaf530 100644
--- a/src/util/virrandom.h
+++ b/src/util/virrandom.h
@@ -24,5 +24,5 @@ uint64_t virRandomBits(int nbits) ATTRIBUTE_NOINLINE;
 double virRandom(void);
 uint32_t virRandomInt(uint32_t max);
 int virRandomBytes(unsigned char *buf, size_t buflen)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
 int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOINLINE;
diff --git a/src/util/virstring.h b/src/util/virstring.h
index af6e234d83..a7ef9a36a7 100644
--- a/src/util/virstring.h
+++ b/src/util/virstring.h
@@ -63,55 +63,55 @@ int virStrToLong_i(char const *s,
                    char **end_ptr,
                    int base,
                    int *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virStrToLong_ui(char const *s,
                     char **end_ptr,
                     int base,
                     unsigned int *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_uip(char const *s,
                      char **end_ptr,
                      int base,
                      unsigned int *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_l(char const *s,
                    char **end_ptr,
                    int base,
                    long *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_ul(char const *s,
                     char **end_ptr,
                     int base,
                     unsigned long *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_ulp(char const *s,
                      char **end_ptr,
                      int base,
                      unsigned long *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_ll(char const *s,
                     char **end_ptr,
                     int base,
                     long long *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_ull(char const *s,
                      char **end_ptr,
                      int base,
                      unsigned long long *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToLong_ullp(char const *s,
                       char **end_ptr,
                       int base,
                       unsigned long long *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrToDouble(char const *s,
                    char **end_ptr,
                    double *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virDoubleToStr(char **strp, double number)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 void virSkipSpaces(const char **str) ATTRIBUTE_NONNULL(1);
 void virSkipSpacesAndBackslash(const char **str) ATTRIBUTE_NONNULL(1);
@@ -122,23 +122,23 @@ void virSkipSpacesBackwards(const char *str, char **endp)
 bool virStringIsEmpty(const char *str);
 
 int virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virStrcpy(char *dest, const char *src, size_t destbytes)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 #define virStrcpyStatic(dest, src) virStrcpy((dest), (src), sizeof(dest))
 
 /* Don't call these directly - use the macros below */
 int virStrdup(char **dest, const char *src)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
 
 int virStrndup(char **dest, const char *src, ssize_t n)
-    ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
+    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
 int virAsprintfInternal(char **strp, const char *fmt, ...)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 3)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 int virVasprintfInternal(char **strp, const char *fmt, va_list list)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 0)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 /**
  * VIR_STRDUP:
@@ -276,7 +276,7 @@ bool virStringHasSuffix(const char *str,
 bool virStringHasCaseSuffix(const char *str,
                             const char *suffix);
 bool virStringStripSuffix(char *str,
-                          const char *suffix) ATTRIBUTE_RETURN_CHECK;
+                          const char *suffix) G_GNUC_WARN_UNUSED_RESULT;
 bool virStringMatchesNameSuffix(const char *file,
                                 const char *name,
                                 const char *suffix);
@@ -295,11 +295,11 @@ void virStringTrimOptionalNewline(char *str);
 
 int virStringParsePort(const char *str,
                        unsigned int *port)
-    ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 int virStringParseYesNo(const char *str,
                         bool *result)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 /**
  * VIR_AUTOSTRINGLIST:
  *
diff --git a/src/util/virthread.h b/src/util/virthread.h
index 6bbc09fa13..a7960e444a 100644
--- a/src/util/virthread.h
+++ b/src/util/virthread.h
@@ -92,7 +92,7 @@ int virThreadCreateFull(virThreadPtr thread,
                         virThreadFunc func,
                         const char *funcName,
                         bool worker,
-                        void *opaque) ATTRIBUTE_RETURN_CHECK;
+                        void *opaque) G_GNUC_WARN_UNUSED_RESULT;
 void virThreadSelf(virThreadPtr thread);
 bool virThreadIsSelf(virThreadPtr thread);
 void virThreadJoin(virThreadPtr thread);
@@ -121,17 +121,17 @@ unsigned long long virThreadID(virThreadPtr thread);
  * }
  */
 int virOnce(virOnceControlPtr once, virOnceFunc init)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
-int virMutexInit(virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
-int virMutexInitRecursive(virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
+int virMutexInit(virMutexPtr m) G_GNUC_WARN_UNUSED_RESULT;
+int virMutexInitRecursive(virMutexPtr m) G_GNUC_WARN_UNUSED_RESULT;
 void virMutexDestroy(virMutexPtr m);
 
 void virMutexLock(virMutexPtr m);
 void virMutexUnlock(virMutexPtr m);
 
 
-int virRWLockInit(virRWLockPtr m) ATTRIBUTE_RETURN_CHECK;
+int virRWLockInit(virRWLockPtr m) G_GNUC_WARN_UNUSED_RESULT;
 void virRWLockDestroy(virRWLockPtr m);
 
 void virRWLockRead(virRWLockPtr m);
@@ -139,7 +139,7 @@ void virRWLockWrite(virRWLockPtr m);
 void virRWLockUnlock(virRWLockPtr m);
 
 
-int virCondInit(virCondPtr c) ATTRIBUTE_RETURN_CHECK;
+int virCondInit(virCondPtr c) G_GNUC_WARN_UNUSED_RESULT;
 int virCondDestroy(virCondPtr c);
 
 /* virCondWait, virCondWaitUntil:
@@ -147,8 +147,8 @@ int virCondDestroy(virCondPtr c);
  * changing value. Therefore in nearly all cases they
  * should be enclosed in a while loop that checks the predicate.
  */
-int virCondWait(virCondPtr c, virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
-int virCondWaitUntil(virCondPtr c, virMutexPtr m, unsigned long long whenms) ATTRIBUTE_RETURN_CHECK;
+int virCondWait(virCondPtr c, virMutexPtr m) G_GNUC_WARN_UNUSED_RESULT;
+int virCondWaitUntil(virCondPtr c, virMutexPtr m, unsigned long long whenms) G_GNUC_WARN_UNUSED_RESULT;
 
 void virCondSignal(virCondPtr c);
 void virCondBroadcast(virCondPtr c);
@@ -156,9 +156,9 @@ void virCondBroadcast(virCondPtr c);
 
 typedef void (*virThreadLocalCleanup)(void *);
 int virThreadLocalInit(virThreadLocalPtr l,
-                       virThreadLocalCleanup c) ATTRIBUTE_RETURN_CHECK;
+                       virThreadLocalCleanup c) G_GNUC_WARN_UNUSED_RESULT;
 void *virThreadLocalGet(virThreadLocalPtr l);
-int virThreadLocalSet(virThreadLocalPtr l, void*) ATTRIBUTE_RETURN_CHECK;
+int virThreadLocalSet(virThreadLocalPtr l, void*) G_GNUC_WARN_UNUSED_RESULT;
 
 
 /**
diff --git a/src/util/virthreadpool.h b/src/util/virthreadpool.h
index 7dfb511c0a..5a55e22489 100644
--- a/src/util/virthreadpool.h
+++ b/src/util/virthreadpool.h
@@ -50,7 +50,7 @@ void virThreadPoolFree(virThreadPoolPtr pool);
 int virThreadPoolSendJob(virThreadPoolPtr pool,
                          unsigned int priority,
                          void *jobdata) ATTRIBUTE_NONNULL(1)
-                                        ATTRIBUTE_RETURN_CHECK;
+                                        G_GNUC_WARN_UNUSED_RESULT;
 
 int virThreadPoolSetParameters(virThreadPoolPtr pool,
                                long long int minWorkers,
diff --git a/src/util/virtime.h b/src/util/virtime.h
index b8ea38e291..d4fba4aff5 100644
--- a/src/util/virtime.h
+++ b/src/util/virtime.h
@@ -40,26 +40,26 @@ void virTimeFieldsThen(unsigned long long when, struct tm *fields)
 /* These APIs are async signal safe and return -1, setting
  * errno on failure */
 int virTimeMillisNowRaw(unsigned long long *now)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virTimeFieldsNowRaw(struct tm *fields)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virTimeStringNowRaw(char *buf)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virTimeStringThenRaw(unsigned long long when, char *buf)
-    ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 /* These APIs are *not* async signal safe and return -1,
  * raising a libvirt error on failure
  */
 int virTimeMillisNow(unsigned long long *now)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 int virTimeFieldsNow(struct tm *fields)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 char *virTimeStringNow(void);
 char *virTimeStringThen(unsigned long long when);
 
 int virTimeLocalOffsetFromUTC(long *offset)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 typedef struct {
     unsigned long long start_t;
diff --git a/src/util/virtypedparam.h b/src/util/virtypedparam.h
index 2c998978ea..0e39a19120 100644
--- a/src/util/virtypedparam.h
+++ b/src/util/virtypedparam.h
@@ -62,7 +62,7 @@ struct _virTypedParameterRemote {
 
 int virTypedParamsValidate(virTypedParameterPtr params, int nparams,
                            /* const char *name, int type ... */ ...)
-    G_GNUC_NULL_TERMINATED ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_NULL_TERMINATED G_GNUC_WARN_UNUSED_RESULT;
 
 bool virTypedParamsCheck(virTypedParameterPtr params,
                          int nparams,
@@ -79,12 +79,12 @@ virTypedParamsFilter(virTypedParameterPtr params,
                      int nparams,
                      const char *name,
                      virTypedParameterPtr **ret)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 
 int virTypedParameterAssign(virTypedParameterPtr param, const char *name,
                             int type, /* TYPE arg */ ...)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int virTypedParamsReplaceString(virTypedParameterPtr *params,
                                 int *nparams,
@@ -149,34 +149,34 @@ int virTypedParamListAddInt(virTypedParamListPtr list,
                             int value,
                             const char *namefmt,
                             ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
 int virTypedParamListAddUInt(virTypedParamListPtr list,
                              unsigned int value,
                              const char *namefmt,
                              ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
 int virTypedParamListAddLLong(virTypedParamListPtr list,
                               long long value,
                               const char *namefmt,
                               ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
 int virTypedParamListAddULLong(virTypedParamListPtr list,
                                unsigned long long value,
                                const char *namefmt,
                                ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
 int virTypedParamListAddString(virTypedParamListPtr list,
                                const char *value,
                                const char *namefmt,
                                ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
 int virTypedParamListAddBoolean(virTypedParamListPtr list,
                                 bool value,
                                 const char *namefmt,
                                 ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
 int virTypedParamListAddDouble(virTypedParamListPtr list,
                                double value,
                                const char *namefmt,
                                ...)
-    ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/src/util/virutil.h b/src/util/virutil.h
index 15ae67dea2..d265d698d0 100644
--- a/src/util/virutil.h
+++ b/src/util/virutil.h
@@ -27,11 +27,11 @@
 #include <sys/types.h>
 
 
-int virSetBlocking(int fd, bool blocking) ATTRIBUTE_RETURN_CHECK;
-int virSetNonBlock(int fd) ATTRIBUTE_RETURN_CHECK;
-int virSetInherit(int fd, bool inherit) ATTRIBUTE_RETURN_CHECK;
-int virSetCloseExec(int fd) ATTRIBUTE_RETURN_CHECK;
-int virSetSockReuseAddr(int fd, bool fatal) ATTRIBUTE_RETURN_CHECK;
+int virSetBlocking(int fd, bool blocking) G_GNUC_WARN_UNUSED_RESULT;
+int virSetNonBlock(int fd) G_GNUC_WARN_UNUSED_RESULT;
+int virSetInherit(int fd, bool inherit) G_GNUC_WARN_UNUSED_RESULT;
+int virSetCloseExec(int fd) G_GNUC_WARN_UNUSED_RESULT;
+int virSetSockReuseAddr(int fd, bool fatal) G_GNUC_WARN_UNUSED_RESULT;
 
 int virSetUIDGID(uid_t uid, gid_t gid, gid_t *groups, int ngroups);
 int virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *groups, int ngroups,
@@ -42,7 +42,7 @@ void virWaitForDevices(void);
 
 int virScaleInteger(unsigned long long *value, const char *suffix,
                     unsigned long long scale, unsigned long long limit)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 int virHexToBin(unsigned char c);
 
@@ -50,7 +50,7 @@ int virParseVersionString(const char *str, unsigned long *version,
                           bool allowMissing);
 
 char *virFormatIntDecimal(char *buf, size_t buflen, int val)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
 
 unsigned long long
 virFormatIntPretty(unsigned long long val,
@@ -108,9 +108,9 @@ char *virGetGroupName(gid_t gid) ATTRIBUTE_NOINLINE;
 int virGetGroupList(uid_t uid, gid_t group, gid_t **groups)
     ATTRIBUTE_NONNULL(3);
 int virGetUserID(const char *name,
-                 uid_t *uid) ATTRIBUTE_RETURN_CHECK;
+                 uid_t *uid) G_GNUC_WARN_UNUSED_RESULT;
 int virGetGroupID(const char *name,
-                  gid_t *gid) ATTRIBUTE_RETURN_CHECK;
+                  gid_t *gid) G_GNUC_WARN_UNUSED_RESULT;
 
 bool virDoesUserExist(const char *name);
 bool virDoesGroupExist(const char *name);
diff --git a/src/util/viruuid.h b/src/util/viruuid.h
index b709c182ff..54fbd88805 100644
--- a/src/util/viruuid.h
+++ b/src/util/viruuid.h
@@ -49,7 +49,7 @@ int virUUIDGenerate(unsigned char *uuid) ATTRIBUTE_NOINLINE;
 
 int virUUIDParse(const char *uuidstr,
                  unsigned char *uuid)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 const char *virUUIDFormat(const unsigned char *uuid,
                           char *uuidstr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
diff --git a/src/util/virxml.h b/src/util/virxml.h
index 39e5a988a2..c7def9ce61 100644
--- a/src/util/virxml.h
+++ b/src/util/virxml.h
@@ -31,7 +31,7 @@
 #include "virautoclean.h"
 
 xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 int              virXPathBoolean(const char *xpath,
                                  xmlXPathContextPtr ctxt);
@@ -221,7 +221,7 @@ virXMLFormatElement(virBufferPtr buf,
                     const char *name,
                     virBufferPtr attrBuf,
                     virBufferPtr childBuf)
-    ATTRIBUTE_RETURN_CHECK;
+    G_GNUC_WARN_UNUSED_RESULT;
 
 struct _virXPathContextNodeSave {
     xmlXPathContextPtr ctxt;
diff --git a/tools/virsh-domain-monitor.h b/tools/virsh-domain-monitor.h
index 77e83502db..11a9156ae2 100644
--- a/tools/virsh-domain-monitor.h
+++ b/tools/virsh-domain-monitor.h
@@ -24,6 +24,6 @@
 
 char *virshGetDomainDescription(vshControl *ctl, virDomainPtr dom,
                                 bool title, unsigned int flags)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 extern const vshCmdDef domMonitoringCmds[];
diff --git a/tools/virsh-util.h b/tools/virsh-util.h
index 7fdd39dd12..955d34dcfc 100644
--- a/tools/virsh-util.h
+++ b/tools/virsh-util.h
@@ -98,7 +98,7 @@ virshDomainGetXMLFromDom(vshControl *ctl,
                          xmlDocPtr *xml,
                          xmlXPathContextPtr *ctxt)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
 
 int
 virshDomainGetXML(vshControl *ctl,
@@ -107,4 +107,4 @@ virshDomainGetXML(vshControl *ctl,
                   xmlDocPtr *xml,
                   xmlXPathContextPtr *ctxt)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
-    ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
diff --git a/tools/vsh.h b/tools/vsh.h
index 4e02bb177d..947904f6c0 100644
--- a/tools/vsh.h
+++ b/tools/vsh.h
@@ -255,39 +255,39 @@ bool vshCmdGrpHelp(vshControl *ctl, const vshCmdGrp *grp);
 
 int vshCommandOptInt(vshControl *ctl, const vshCmd *cmd,
                      const char *name, int *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptUInt(vshControl *ctl, const vshCmd *cmd,
                       const char *name, unsigned int *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptUIntWrap(vshControl *ctl, const vshCmd *cmd,
                           const char *name, unsigned int *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptUL(vshControl *ctl, const vshCmd *cmd,
                     const char *name, unsigned long *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptULWrap(vshControl *ctl, const vshCmd *cmd,
                         const char *name, unsigned long *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptStringQuiet(vshControl *ctl, const vshCmd *cmd,
                              const char *name, const char **value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptStringReq(vshControl *ctl, const vshCmd *cmd,
                            const char *name, const char **value)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptLongLong(vshControl *ctl, const vshCmd *cmd,
                           const char *name, long long *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptULongLong(vshControl *ctl, const vshCmd *cmd,
                            const char *name, unsigned long long *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptULongLongWrap(vshControl *ctl, const vshCmd *cmd,
                                const char *name, unsigned long long *value)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshCommandOptScaledInt(vshControl *ctl, const vshCmd *cmd,
                            const char *name, unsigned long long *value,
                            int scale, unsigned long long max)
-    ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
+    ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
 int vshBlockJobOptionBandwidth(vshControl *ctl,
                                const vshCmd *cmd,
                                bool bytes,
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux