[dbus PATCH 01/18] util: rename VIR_ATTR_UNUSED

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

 



The correct prefix is VIRT.

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/connect.c |  8 +++---
 src/domain.c  | 78 +++++++++++++++++++++++++++++------------------------------
 src/events.c  | 12 ++++-----
 src/main.c    | 12 ++++-----
 src/util.h    |  3 ++-
 5 files changed, 57 insertions(+), 56 deletions(-)

diff --git a/src/connect.c b/src/connect.c
index 360f922..b44d247 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -17,8 +17,8 @@ static int virtDBusConnectCredType[] = {
 };
 
 static int
-virtDBusConnectAuthCallback(virConnectCredentialPtr cred VIR_ATTR_UNUSED,
-                            unsigned int ncred VIR_ATTR_UNUSED,
+virtDBusConnectAuthCallback(virConnectCredentialPtr cred VIRT_ATTR_UNUSED,
+                            unsigned int ncred VIRT_ATTR_UNUSED,
                             void *cbdata)
 {
     sd_bus_error *error = cbdata;
@@ -78,8 +78,8 @@ virtDBusConnectOpen(virtDBusConnect *connect,
 }
 
 static int
-virtDBusConnectEnumarateDomains(sd_bus *bus VIR_ATTR_UNUSED,
-                                const char *path VIR_ATTR_UNUSED,
+virtDBusConnectEnumarateDomains(sd_bus *bus VIRT_ATTR_UNUSED,
+                                const char *path VIRT_ATTR_UNUSED,
                                 void *userdata,
                                 char ***nodes,
                                 sd_bus_error *error)
diff --git a/src/domain.c b/src/domain.c
index 33ed2b3..ebcd142 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -5,13 +5,13 @@
 #include <stdio.h>
 
 static int
-virtDBusDomainGetName(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetName(sd_bus *bus VIRT_ATTR_UNUSED,
                       const char *path,
-                      const char *interface VIR_ATTR_UNUSED,
-                      const char *property VIR_ATTR_UNUSED,
+                      const char *interface VIRT_ATTR_UNUSED,
+                      const char *property VIRT_ATTR_UNUSED,
                       sd_bus_message *reply,
                       void *userdata,
-                      sd_bus_error *error VIR_ATTR_UNUSED)
+                      sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -30,13 +30,13 @@ virtDBusDomainGetName(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetUUID(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetUUID(sd_bus *bus VIRT_ATTR_UNUSED,
                       const char *path,
-                      const char *interface VIR_ATTR_UNUSED,
-                      const char *property VIR_ATTR_UNUSED,
+                      const char *interface VIRT_ATTR_UNUSED,
+                      const char *property VIRT_ATTR_UNUSED,
                       sd_bus_message *reply,
                       void *userdata,
-                      sd_bus_error *error VIR_ATTR_UNUSED)
+                      sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -53,13 +53,13 @@ virtDBusDomainGetUUID(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetId(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetId(sd_bus *bus VIRT_ATTR_UNUSED,
                     const char *path,
-                    const char *interface VIR_ATTR_UNUSED,
-                    const char *property VIR_ATTR_UNUSED,
+                    const char *interface VIRT_ATTR_UNUSED,
+                    const char *property VIRT_ATTR_UNUSED,
                     sd_bus_message *reply,
                     void *userdata,
-                    sd_bus_error *error VIR_ATTR_UNUSED)
+                    sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -73,13 +73,13 @@ virtDBusDomainGetId(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetVcpus(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetVcpus(sd_bus *bus VIRT_ATTR_UNUSED,
                        const char *path,
-                       const char *interface VIR_ATTR_UNUSED,
-                       const char *property VIR_ATTR_UNUSED,
+                       const char *interface VIRT_ATTR_UNUSED,
+                       const char *property VIRT_ATTR_UNUSED,
                        sd_bus_message *reply,
                        void *userdata,
-                       sd_bus_error *error VIR_ATTR_UNUSED)
+                       sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -93,13 +93,13 @@ virtDBusDomainGetVcpus(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetOsType(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetOsType(sd_bus *bus VIRT_ATTR_UNUSED,
                         const char *path,
-                        const char *interface VIR_ATTR_UNUSED,
-                        const char *property VIR_ATTR_UNUSED,
+                        const char *interface VIRT_ATTR_UNUSED,
+                        const char *property VIRT_ATTR_UNUSED,
                         sd_bus_message *reply,
                         void *userdata,
-                        sd_bus_error *error VIR_ATTR_UNUSED)
+                        sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -118,13 +118,13 @@ virtDBusDomainGetOsType(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetActive(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetActive(sd_bus *bus VIRT_ATTR_UNUSED,
                         const char *path,
-                        const char *interface VIR_ATTR_UNUSED,
-                        const char *property VIR_ATTR_UNUSED,
+                        const char *interface VIRT_ATTR_UNUSED,
+                        const char *property VIRT_ATTR_UNUSED,
                         sd_bus_message *reply,
                         void *userdata,
-                        sd_bus_error *error VIR_ATTR_UNUSED)
+                        sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -143,13 +143,13 @@ virtDBusDomainGetActive(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetPersistent(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetPersistent(sd_bus *bus VIRT_ATTR_UNUSED,
                             const char *path,
-                            const char *interface VIR_ATTR_UNUSED,
-                            const char *property VIR_ATTR_UNUSED,
+                            const char *interface VIRT_ATTR_UNUSED,
+                            const char *property VIRT_ATTR_UNUSED,
                             sd_bus_message *reply,
                             void *userdata,
-                            sd_bus_error *error VIR_ATTR_UNUSED)
+                            sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -168,13 +168,13 @@ virtDBusDomainGetPersistent(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetState(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetState(sd_bus *bus VIRT_ATTR_UNUSED,
                        const char *path,
-                       const char *interface VIR_ATTR_UNUSED,
-                       const char *property VIR_ATTR_UNUSED,
+                       const char *interface VIRT_ATTR_UNUSED,
+                       const char *property VIRT_ATTR_UNUSED,
                        sd_bus_message *reply,
                        void *userdata,
-                       sd_bus_error *error VIR_ATTR_UNUSED)
+                       sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -220,13 +220,13 @@ virtDBusDomainGetState(sd_bus *bus VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusDomainGetAutostart(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainGetAutostart(sd_bus *bus VIRT_ATTR_UNUSED,
                            const char *path,
-                           const char *interface VIR_ATTR_UNUSED,
-                           const char *property VIR_ATTR_UNUSED,
+                           const char *interface VIRT_ATTR_UNUSED,
+                           const char *property VIRT_ATTR_UNUSED,
                            sd_bus_message *reply,
                            void *userdata,
-                           sd_bus_error *error VIR_ATTR_UNUSED)
+                           sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilVirDomainFreep) virDomainPtr domain = NULL;
@@ -522,12 +522,12 @@ static const sd_bus_vtable virt_domain_vtable[] = {
 };
 
 static int
-virtDBusDomainLookup(sd_bus *bus VIR_ATTR_UNUSED,
+virtDBusDomainLookup(sd_bus *bus VIRT_ATTR_UNUSED,
                      const char *path,
-                     const char *interface VIR_ATTR_UNUSED,
+                     const char *interface VIRT_ATTR_UNUSED,
                      void *userdata,
                      void **found,
-                     sd_bus_error *error VIR_ATTR_UNUSED)
+                     sd_bus_error *error VIRT_ATTR_UNUSED)
 {
     virtDBusConnect *connect = userdata;
     _cleanup_(virtDBusUtilFreep) char *name = NULL;
diff --git a/src/events.c b/src/events.c
index 05d5940..ca1418b 100644
--- a/src/events.c
+++ b/src/events.c
@@ -6,10 +6,10 @@
 #include <systemd/sd-bus.h>
 
 static int
-virtDBusEventsDomainLifecycle(virConnectPtr connection VIR_ATTR_UNUSED,
+virtDBusEventsDomainLifecycle(virConnectPtr connection VIRT_ATTR_UNUSED,
                               virDomainPtr domain,
                               int event,
-                              int detail VIR_ATTR_UNUSED,
+                              int detail VIRT_ATTR_UNUSED,
                               void *opaque)
 {
     virtDBusConnect *connect = opaque;
@@ -70,7 +70,7 @@ virtDBusEventsDomainLifecycle(virConnectPtr connection VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusEventsDomainDeviceAdded(virConnectPtr connection VIR_ATTR_UNUSED,
+virtDBusEventsDomainDeviceAdded(virConnectPtr connection VIRT_ATTR_UNUSED,
                                 virDomainPtr domain,
                                 const char *device,
                                 void *opaque)
@@ -98,7 +98,7 @@ virtDBusEventsDomainDeviceAdded(virConnectPtr connection VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusEventsDomainDeviceRemoved(virConnectPtr connection VIR_ATTR_UNUSED,
+virtDBusEventsDomainDeviceRemoved(virConnectPtr connection VIRT_ATTR_UNUSED,
                                   virDomainPtr domain,
                                   const char *device,
                                   void *opaque)
@@ -126,7 +126,7 @@ virtDBusEventsDomainDeviceRemoved(virConnectPtr connection VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusEventsDomainDiskChange(virConnectPtr connection VIR_ATTR_UNUSED,
+virtDBusEventsDomainDiskChange(virConnectPtr connection VIRT_ATTR_UNUSED,
                                virDomainPtr domain,
                                const char *device,
                                int reason,
@@ -168,7 +168,7 @@ virtDBusEventsDomainDiskChange(virConnectPtr connection VIR_ATTR_UNUSED,
 }
 
 static int
-virtDBusEventsDomainTrayChange(virConnectPtr connection VIR_ATTR_UNUSED,
+virtDBusEventsDomainTrayChange(virConnectPtr connection VIRT_ATTR_UNUSED,
                                virDomainPtr domain,
                                const char *old_src_path,
                                const char *new_src_path,
diff --git a/src/main.c b/src/main.c
index d41970a..e0f9434 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,18 +55,18 @@ virtDBusVirEventRemoveHandlep(int *watchp)
 }
 
 static void
-virtDBusHandleSignal(int watch VIR_ATTR_UNUSED,
-                     int fd VIR_ATTR_UNUSED,
-                     int events VIR_ATTR_UNUSED,
-                     void *opaque VIR_ATTR_UNUSED)
+virtDBusHandleSignal(int watch VIRT_ATTR_UNUSED,
+                     int fd VIRT_ATTR_UNUSED,
+                     int events VIRT_ATTR_UNUSED,
+                     void *opaque VIRT_ATTR_UNUSED)
 {
     loop_status = -ECANCELED;
 }
 
 static void
 virtDBusHandleBusEvent(int watch,
-                       int fd VIR_ATTR_UNUSED,
-                       int events VIR_ATTR_UNUSED,
+                       int fd VIRT_ATTR_UNUSED,
+                       int events VIRT_ATTR_UNUSED,
                        void *opaque)
 {
     sd_bus *bus = opaque;
diff --git a/src/util.h b/src/util.h
index fcbcf8e..9779d29 100644
--- a/src/util.h
+++ b/src/util.h
@@ -6,7 +6,8 @@
 #include <unistd.h>
 
 #define _cleanup_(_x) __attribute__((__cleanup__(_x)))
-#define VIR_ATTR_UNUSED __attribute__((__unused__))
+
+#define VIRT_ATTR_UNUSED __attribute__((__unused__))
 
 #define VIRT_N_ELEMENTS(array) (sizeof(array) / sizeof(*(array)))
 
-- 
2.14.3

--
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