[PATCH 3/8] Use G_GNUC_NO_INLINE instead of ATTRIBUTE_NOINLINE

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

 



Define the macro for older GLib versions.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 build-aux/mock-noinline.pl      |  2 +-
 build-aux/syntax-check.mk       |  2 +-
 src/internal.h                  |  8 +++++---
 src/qemu/qemu_capspriv.h        |  2 +-
 src/rpc/virnetsocket.h          |  4 ++--
 src/util/vircommand.h           |  2 +-
 src/util/virfile.h              | 16 ++++++++--------
 src/util/virhashcode.h          |  2 +-
 src/util/virhostcpu.h           |  4 ++--
 src/util/virhostuptime.h        |  2 +-
 src/util/virmacaddr.h           |  2 +-
 src/util/virnetdev.h            | 10 +++++-----
 src/util/virnetdevip.h          |  2 +-
 src/util/virnetdevmacvlan.h     |  2 +-
 src/util/virnetdevopenvswitch.h |  2 +-
 src/util/virnetdevtap.h         |  6 +++---
 src/util/virnuma.h              | 16 ++++++++--------
 src/util/virprocess.h           |  4 ++--
 src/util/virrandom.h            |  6 +++---
 src/util/virscsi.h              |  2 +-
 src/util/virscsivhost.h         |  2 +-
 src/util/virtpm.h               |  2 +-
 src/util/virutil.h              | 12 ++++++------
 src/util/viruuid.h              |  2 +-
 24 files changed, 58 insertions(+), 56 deletions(-)

diff --git a/build-aux/mock-noinline.pl b/build-aux/mock-noinline.pl
index db5420825f..b005b8d95e 100644
--- a/build-aux/mock-noinline.pl
+++ b/build-aux/mock-noinline.pl
@@ -46,7 +46,7 @@ sub scan_annotations {
         } elsif (/^\s*$/) {
             $func = undef;
         }
-        if (/ATTRIBUTE_NOINLINE/) {
+        if (/G_GNUC_NO_INLINE/) {
             if (defined $func) {
                 $noninlined{$func} = 1;
             }
diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index c0612a3319..c8ca6279a2 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -629,7 +629,7 @@ sc_avoid_g_gnuc_unused_in_header:
 	  $(_sc_search_regexp)
 
 sc_prohibit_attribute_macros:
-	@prohibit='ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK)' \
+	@prohibit='ATTRIBUTE_(UNUSED|NORETURN|SENTINEL|RETURN_CHECK|NOINLINE)' \
 	in_vc_files='\.[ch]$$' \
 	halt='use GLib macros: G_GNUC_<ATTRIBUTE_SUFFIX> for most' \
 	  $(_sc_search_regexp)
diff --git a/src/internal.h b/src/internal.h
index 7737d9a209..e2e27342d7 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -94,13 +94,15 @@
 #define ARRAY_CARDINALITY(Array) (sizeof(Array) / sizeof(*(Array)))
 
 /**
- * ATTRIBUTE_NOINLINE:
+ * G_GNUC_NO_INLINE:
  *
  * Force compiler not to inline a method. Should be used if
  * the method need to be overridable by test mocks.
+ *
+ * TODO: Remove after upgrading to GLib >= 2.58
  */
-#ifndef ATTRIBUTE_NOINLINE
-# define ATTRIBUTE_NOINLINE __attribute__((__noinline__))
+#ifndef G_GNUC_NO_INLINE
+# define G_GNUC_NO_INLINE __attribute__((__noinline__))
 #endif
 
 /**
diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h
index 6b54e94fd3..e8fe48d8f0 100644
--- a/src/qemu/qemu_capspriv.h
+++ b/src/qemu/qemu_capspriv.h
@@ -83,7 +83,7 @@ virQEMUCapsGetCPUModelX86Data(virQEMUCapsPtr qemuCaps,
 
 virCPUDefPtr
 virQEMUCapsProbeHostCPU(virArch hostArch,
-                        virDomainCapsCPUModelsPtr models) ATTRIBUTE_NOINLINE;
+                        virDomainCapsCPUModelsPtr models) G_GNUC_NO_INLINE;
 
 void
 virQEMUCapsSetGICCapabilities(virQEMUCapsPtr qemuCaps,
diff --git a/src/rpc/virnetsocket.h b/src/rpc/virnetsocket.h
index 2f626cb08f..8d075464cb 100644
--- a/src/rpc/virnetsocket.h
+++ b/src/rpc/virnetsocket.h
@@ -136,10 +136,10 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock,
                                 gid_t *gid,
                                 pid_t *pid,
                                 unsigned long long *timestamp)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 int virNetSocketGetSELinuxContext(virNetSocketPtr sock,
                                   char **context)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 int virNetSocketSetBlocking(virNetSocketPtr sock,
                             bool blocking);
diff --git a/src/util/vircommand.h b/src/util/vircommand.h
index 6bc1ef87b0..10961a328f 100644
--- a/src/util/vircommand.h
+++ b/src/util/vircommand.h
@@ -58,7 +58,7 @@ typedef enum {
 
 void virCommandPassFD(virCommandPtr cmd,
                       int fd,
-                      unsigned int flags) ATTRIBUTE_NOINLINE;
+                      unsigned int flags) G_GNUC_NO_INLINE;
 
 int virCommandPassFDGetFDIndex(virCommandPtr cmd,
                                int fd);
diff --git a/src/util/virfile.h b/src/util/virfile.h
index a66e3569a3..555e6ebee7 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -114,9 +114,9 @@ int virFileWrapperFdClose(virFileWrapperFdPtr dfd);
 void virFileWrapperFdFree(virFileWrapperFdPtr dfd);
 
 int virFileLock(int fd, bool shared, off_t start, off_t len, bool waitForLock)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 int virFileUnlock(int fd, off_t start, off_t len)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 int virFileFlock(int fd, bool lock, bool shared);
 
@@ -199,7 +199,7 @@ void virFileActivateDirOverrideForLib(void);
 
 off_t virFileLength(const char *path, int fd) ATTRIBUTE_NONNULL(1);
 bool virFileIsDir (const char *file) ATTRIBUTE_NONNULL(1);
-bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NOINLINE;
+bool virFileExists(const char *file) ATTRIBUTE_NONNULL(1) G_GNUC_NO_INLINE;
 bool virFileIsExecutable(const char *file) ATTRIBUTE_NONNULL(1);
 bool virFileIsRegular(const char *file) ATTRIBUTE_NONNULL(1);
 
@@ -231,7 +231,7 @@ int virFileGetMountReverseSubtree(const char *mtabpath,
                                   size_t *nmountsret) G_GNUC_WARN_UNUSED_RESULT;
 
 char *virFileSanitizePath(const char *path);
-char *virFileCanonicalizePath(const char *path) ATTRIBUTE_NOINLINE;
+char *virFileCanonicalizePath(const char *path) G_GNUC_NO_INLINE;
 
 enum {
     VIR_FILE_OPEN_NONE        = 0,
@@ -383,18 +383,18 @@ VIR_DEFINE_AUTOPTR_FUNC(virFileWrapperFd, virFileWrapperFdFree);
 int virFileGetXAttr(const char *path,
                     const char *name,
                     char **value)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 int virFileGetXAttrQuiet(const char *path,
                          const char *name,
                          char **value)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 int virFileSetXAttr(const char *path,
                     const char *name,
                     const char *value)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 int virFileRemoveXAttr(const char *path,
                        const char *name)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
diff --git a/src/util/virhashcode.h b/src/util/virhashcode.h
index af877c93cc..e23b0c3615 100644
--- a/src/util/virhashcode.h
+++ b/src/util/virhashcode.h
@@ -30,4 +30,4 @@
 #include "internal.h"
 
 uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h
index 2ba79b97a5..d95d380d4a 100644
--- a/src/util/virhostcpu.h
+++ b/src/util/virhostcpu.h
@@ -44,7 +44,7 @@ bool virHostCPUHasBitmap(void);
 virBitmapPtr virHostCPUGetPresentBitmap(void);
 virBitmapPtr virHostCPUGetOnlineBitmap(void);
 int virHostCPUGetCount(void);
-int virHostCPUGetThreadsPerSubcore(virArch arch) ATTRIBUTE_NOINLINE;
+int virHostCPUGetThreadsPerSubcore(virArch arch) G_GNUC_NO_INLINE;
 
 int virHostCPUGetMap(unsigned char **cpumap,
                      unsigned int *online,
@@ -57,7 +57,7 @@ int virHostCPUGetInfo(virArch hostarch,
                       unsigned int *cores,
                       unsigned int *threads);
 
-int virHostCPUGetKVMMaxVCPUs(void) ATTRIBUTE_NOINLINE;
+int virHostCPUGetKVMMaxVCPUs(void) G_GNUC_NO_INLINE;
 
 int virHostCPUStatsAssign(virNodeCPUStatsPtr param,
                           const char *name,
diff --git a/src/util/virhostuptime.h b/src/util/virhostuptime.h
index 03c1517a64..7e2c4c0c81 100644
--- a/src/util/virhostuptime.h
+++ b/src/util/virhostuptime.h
@@ -24,4 +24,4 @@
 
 int
 virHostGetBootTime(unsigned long long *when)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
diff --git a/src/util/virmacaddr.h b/src/util/virmacaddr.h
index cf26a8bbfa..843893d759 100644
--- a/src/util/virmacaddr.h
+++ b/src/util/virmacaddr.h
@@ -52,7 +52,7 @@ void virMacAddrGetRaw(const virMacAddr *src, unsigned char dst[VIR_MAC_BUFLEN]);
 const char *virMacAddrFormat(const virMacAddr *addr,
                              char *str);
 void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
-                        virMacAddrPtr addr) ATTRIBUTE_NOINLINE;
+                        virMacAddrPtr addr) G_GNUC_NO_INLINE;
 int virMacAddrParse(const char* str,
                     virMacAddrPtr addr) G_GNUC_WARN_UNUSED_RESULT;
 int virMacAddrParseHex(const char* str,
diff --git a/src/util/virnetdev.h b/src/util/virnetdev.h
index ff8df31a37..854fddfe77 100644
--- a/src/util/virnetdev.h
+++ b/src/util/virnetdev.h
@@ -150,11 +150,11 @@ int virNetDevSetupControl(const char *ifname,
     G_GNUC_WARN_UNUSED_RESULT;
 
 int virNetDevExists(const char *brname)
-    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 int virNetDevSetOnline(const char *ifname,
                        bool online)
-    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 int virNetDevGetOnline(const char *ifname,
                       bool *online)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
@@ -162,7 +162,7 @@ int virNetDevGetOnline(const char *ifname,
 
 int virNetDevSetMAC(const char *ifname,
                     const virMacAddr *macaddr)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 int virNetDevGetMAC(const char *ifname,
                     virMacAddrPtr macaddr)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
@@ -306,9 +306,9 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link,
                        const char *ifname,
                        const char *file)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 int virNetDevRunEthernetScript(const char *ifname, const char *script)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 VIR_DEFINE_AUTOPTR_FUNC(virNetDevRxFilter, virNetDevRxFilterFree);
diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h
index 43271f827b..7af94a49d7 100644
--- a/src/util/virnetdevip.h
+++ b/src/util/virnetdevip.h
@@ -63,7 +63,7 @@ int virNetDevIPAddrAdd(const char *ifname,
                        virSocketAddr *addr,
                        virSocketAddr *peer,
                        unsigned int prefix)
-    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 int virNetDevIPRouteAdd(const char *ifname,
                         virSocketAddrPtr addr,
                         unsigned int prefix,
diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h
index 4c153dfb5c..30038a45b5 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) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+   ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 int virNetDevMacVLanCreate(const char *ifname,
                            const char *type,
diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h
index b70ee7a559..2e15384b5f 100644
--- a/src/util/virnetdevopenvswitch.h
+++ b/src/util/virnetdevopenvswitch.h
@@ -62,7 +62,7 @@ int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
 
 int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
                                            char **ifname)
-    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 int virNetDevOpenvswitchUpdateVlan(const char *ifname,
                                    virNetDevVlanPtr virtVlan)
diff --git a/src/util/virnetdevtap.h b/src/util/virnetdevtap.h
index 36c2be777e..cbc799bdbe 100644
--- a/src/util/virnetdevtap.h
+++ b/src/util/virnetdevtap.h
@@ -34,7 +34,7 @@ int virNetDevTapCreate(char **ifname,
                        int *tapfd,
                        size_t tapfdSize,
                        unsigned int flags)
-    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 int virNetDevTapDelete(const char *ifname,
                        const char *tunpath)
@@ -44,7 +44,7 @@ int virNetDevTapGetName(int tapfd, char **ifname)
     ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
 
 char* virNetDevTapGetRealDeviceName(char *ifname)
-      ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+      ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 typedef enum {
    VIR_NETDEV_TAP_CREATE_NONE = 0,
@@ -96,7 +96,7 @@ int virNetDevTapCreateInBridgePort(const char *brname,
                                    unsigned int *actualMTU,
                                    unsigned int flags)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
-    G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
+    G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
 
 int virNetDevTapInterfaceStats(const char *ifname,
                                virDomainInterfaceStatsPtr stats,
diff --git a/src/util/virnuma.h b/src/util/virnuma.h
index 3afccdf08f..5a6b36f7e9 100644
--- a/src/util/virnuma.h
+++ b/src/util/virnuma.h
@@ -33,20 +33,20 @@ int virNumaSetupMemoryPolicy(virDomainNumatuneMemMode mode,
                              virBitmapPtr nodeset);
 
 virBitmapPtr virNumaGetHostMemoryNodeset(void);
-bool virNumaNodesetIsAvailable(virBitmapPtr nodeset) ATTRIBUTE_NOINLINE;
-bool virNumaIsAvailable(void) ATTRIBUTE_NOINLINE;
-int virNumaGetMaxNode(void) ATTRIBUTE_NOINLINE;
-bool virNumaNodeIsAvailable(int node) ATTRIBUTE_NOINLINE;
+bool virNumaNodesetIsAvailable(virBitmapPtr nodeset) G_GNUC_NO_INLINE;
+bool virNumaIsAvailable(void) G_GNUC_NO_INLINE;
+int virNumaGetMaxNode(void) G_GNUC_NO_INLINE;
+bool virNumaNodeIsAvailable(int node) G_GNUC_NO_INLINE;
 int virNumaGetDistances(int node,
                         int **distances,
-                        int *ndistances) ATTRIBUTE_NOINLINE;
+                        int *ndistances) G_GNUC_NO_INLINE;
 int virNumaGetNodeMemory(int node,
                          unsigned long long *memsize,
-                         unsigned long long *memfree) ATTRIBUTE_NOINLINE;
+                         unsigned long long *memfree) G_GNUC_NO_INLINE;
 
 unsigned int virNumaGetMaxCPUs(void);
 
-int virNumaGetNodeCPUs(int node, virBitmapPtr *cpus) ATTRIBUTE_NOINLINE;
+int virNumaGetNodeCPUs(int node, virBitmapPtr *cpus) G_GNUC_NO_INLINE;
 int virNumaNodesetToCPUset(virBitmapPtr nodeset,
                            virBitmapPtr *cpuset);
 
@@ -60,7 +60,7 @@ int virNumaGetPages(int node,
                     unsigned long long **pages_avail,
                     unsigned long long **pages_free,
                     size_t *npages)
-    ATTRIBUTE_NONNULL(5) ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(5) G_GNUC_NO_INLINE;
 int virNumaSetPagePoolSize(int node,
                            unsigned int page_size,
                            unsigned long long page_count,
diff --git a/src/util/virprocess.h b/src/util/virprocess.h
index b2a3a0a7a6..04adae6b82 100644
--- a/src/util/virprocess.h
+++ b/src/util/virprocess.h
@@ -75,7 +75,7 @@ int virProcessGetNamespaces(pid_t pid,
 int virProcessSetNamespaces(size_t nfdlist,
                             int *fdlist);
 
-int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) ATTRIBUTE_NOINLINE;
+int virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes) G_GNUC_NO_INLINE;
 int virProcessSetMaxProcesses(pid_t pid, unsigned int procs);
 int virProcessSetMaxFiles(pid_t pid, unsigned int files);
 int virProcessSetMaxCoreSize(pid_t pid, unsigned long long bytes);
@@ -108,7 +108,7 @@ typedef int (*virProcessForkCallback)(pid_t ppid,
 
 int virProcessRunInFork(virProcessForkCallback cb,
                         void *opaque)
-    ATTRIBUTE_NOINLINE;
+    G_GNUC_NO_INLINE;
 
 int virProcessSetupPrivateMountNS(void);
 
diff --git a/src/util/virrandom.h b/src/util/virrandom.h
index 60f9aaf530..297721f912 100644
--- a/src/util/virrandom.h
+++ b/src/util/virrandom.h
@@ -20,9 +20,9 @@
 
 #include "internal.h"
 
-uint64_t virRandomBits(int nbits) ATTRIBUTE_NOINLINE;
+uint64_t virRandomBits(int nbits) G_GNUC_NO_INLINE;
 double virRandom(void);
 uint32_t virRandomInt(uint32_t max);
 int virRandomBytes(unsigned char *buf, size_t buflen)
-    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
-int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOINLINE;
+    ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT G_GNUC_NO_INLINE;
+int virRandomGenerateWWN(char **wwn, const char *virt_type) G_GNUC_NO_INLINE;
diff --git a/src/util/virscsi.h b/src/util/virscsi.h
index 8c2c84e07b..cfd6ac7356 100644
--- a/src/util/virscsi.h
+++ b/src/util/virscsi.h
@@ -37,7 +37,7 @@ char *virSCSIDeviceGetSgName(const char *sysfs_prefix,
                              const char *adapter,
                              unsigned int bus,
                              unsigned int target,
-                             unsigned long long unit) ATTRIBUTE_NOINLINE;
+                             unsigned long long unit) G_GNUC_NO_INLINE;
 char *virSCSIDeviceGetDevName(const char *sysfs_prefix,
                               const char *adapter,
                               unsigned int bus,
diff --git a/src/util/virscsivhost.h b/src/util/virscsivhost.h
index 334eb81af6..52f5d2c33f 100644
--- a/src/util/virscsivhost.h
+++ b/src/util/virscsivhost.h
@@ -61,6 +61,6 @@ void virSCSIVHostDeviceGetUsedBy(virSCSIVHostDevicePtr dev,
                                  const char **drv_name,
                                  const char **dom_name);
 void virSCSIVHostDeviceFree(virSCSIVHostDevicePtr dev);
-int virSCSIVHostOpenVhostSCSI(int *vhostfd) ATTRIBUTE_NOINLINE;
+int virSCSIVHostOpenVhostSCSI(int *vhostfd) G_GNUC_NO_INLINE;
 
 VIR_DEFINE_AUTOPTR_FUNC(virSCSIVHostDevice, virSCSIVHostDeviceFree);
diff --git a/src/util/virtpm.h b/src/util/virtpm.h
index 50948aac9a..d021a083b4 100644
--- a/src/util/virtpm.h
+++ b/src/util/virtpm.h
@@ -20,7 +20,7 @@
 
 #pragma once
 
-char *virTPMCreateCancelPath(const char *devpath) ATTRIBUTE_NOINLINE;
+char *virTPMCreateCancelPath(const char *devpath) G_GNUC_NO_INLINE;
 
 char *virTPMGetSwtpm(void);
 char *virTPMGetSwtpmSetup(void);
diff --git a/src/util/virutil.h b/src/util/virutil.h
index d265d698d0..1a6ae1787a 100644
--- a/src/util/virutil.h
+++ b/src/util/virutil.h
@@ -103,8 +103,8 @@ char *virGetUserConfigDirectory(void);
 char *virGetUserCacheDirectory(void);
 char *virGetUserRuntimeDirectory(void);
 char *virGetUserShell(uid_t uid);
-char *virGetUserName(uid_t uid) ATTRIBUTE_NOINLINE;
-char *virGetGroupName(gid_t gid) ATTRIBUTE_NOINLINE;
+char *virGetUserName(uid_t uid) G_GNUC_NO_INLINE;
+char *virGetGroupName(gid_t gid) G_GNUC_NO_INLINE;
 int virGetGroupList(uid_t uid, gid_t group, gid_t **groups)
     ATTRIBUTE_NONNULL(3);
 int virGetUserID(const char *name,
@@ -138,16 +138,16 @@ int virParseOwnershipIds(const char *label, uid_t *uidPtr, gid_t *gidPtr);
 time_t virGetSelfLastChanged(void);
 void virUpdateSelfLastChanged(const char *path);
 
-long virGetSystemPageSize(void) ATTRIBUTE_NOINLINE;
-long virGetSystemPageSizeKB(void) ATTRIBUTE_NOINLINE;
+long virGetSystemPageSize(void) G_GNUC_NO_INLINE;
+long virGetSystemPageSizeKB(void) G_GNUC_NO_INLINE;
 
 unsigned long long virMemoryLimitTruncate(unsigned long long value);
 bool virMemoryLimitIsSet(unsigned long long value);
-unsigned long long virMemoryMaxValue(bool ulong) ATTRIBUTE_NOINLINE;
+unsigned long long virMemoryMaxValue(bool ulong) G_GNUC_NO_INLINE;
 
 bool virHostHasIOMMU(void);
 
-char *virHostGetDRMRenderNode(void) ATTRIBUTE_NOINLINE;
+char *virHostGetDRMRenderNode(void) G_GNUC_NO_INLINE;
 
 /**
  * VIR_ASSIGN_IS_OVERFLOW:
diff --git a/src/util/viruuid.h b/src/util/viruuid.h
index 54fbd88805..6ea01bb7c1 100644
--- a/src/util/viruuid.h
+++ b/src/util/viruuid.h
@@ -45,7 +45,7 @@ int virGetHostUUID(unsigned char *host_uuid) ATTRIBUTE_NONNULL(1);
 
 int virUUIDIsValid(unsigned char *uuid);
 
-int virUUIDGenerate(unsigned char *uuid) ATTRIBUTE_NOINLINE;
+int virUUIDGenerate(unsigned char *uuid) G_GNUC_NO_INLINE;
 
 int virUUIDParse(const char *uuidstr,
                  unsigned char *uuid)
-- 
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