mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
esx: use G_GNUC_UNUSED
Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
670d339e87
commit
07e802993b
@ -825,7 +825,7 @@ esxConnectToVCenter(esxPrivate *priv,
|
||||
*/
|
||||
static virDrvOpenStatus
|
||||
esxConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
|
||||
virConfPtr conf ATTRIBUTE_UNUSED,
|
||||
virConfPtr conf G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virDrvOpenStatus result = VIR_DRV_OPEN_ERROR;
|
||||
@ -1097,7 +1097,7 @@ esxConnectSupportsFeature(virConnectPtr conn, int feature)
|
||||
|
||||
|
||||
static const char *
|
||||
esxConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
esxConnectGetType(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
return "ESX";
|
||||
}
|
||||
@ -1852,7 +1852,7 @@ esxDomainDestroy(virDomainPtr dom)
|
||||
|
||||
|
||||
static char *
|
||||
esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
|
||||
esxDomainGetOSType(virDomainPtr domain G_GNUC_UNUSED)
|
||||
{
|
||||
char *osType;
|
||||
|
||||
@ -3450,7 +3450,7 @@ esxDomainSetAutostart(virDomainPtr domain, int autostart)
|
||||
* SharesLevel 'low', 'normal' and 'high'.
|
||||
*/
|
||||
static char *
|
||||
esxDomainGetSchedulerType(virDomainPtr domain ATTRIBUTE_UNUSED, int *nparams)
|
||||
esxDomainGetSchedulerType(virDomainPtr domain G_GNUC_UNUSED, int *nparams)
|
||||
{
|
||||
char *type;
|
||||
|
||||
@ -3736,13 +3736,13 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
|
||||
|
||||
static int
|
||||
esxDomainMigratePrepare(virConnectPtr dconn,
|
||||
char **cookie ATTRIBUTE_UNUSED,
|
||||
int *cookielen ATTRIBUTE_UNUSED,
|
||||
const char *uri_in ATTRIBUTE_UNUSED,
|
||||
char **cookie G_GNUC_UNUSED,
|
||||
int *cookielen G_GNUC_UNUSED,
|
||||
const char *uri_in G_GNUC_UNUSED,
|
||||
char **uri_out,
|
||||
unsigned long flags,
|
||||
const char *dname ATTRIBUTE_UNUSED,
|
||||
unsigned long resource ATTRIBUTE_UNUSED)
|
||||
const char *dname G_GNUC_UNUSED,
|
||||
unsigned long resource G_GNUC_UNUSED)
|
||||
{
|
||||
esxPrivate *priv = dconn->privateData;
|
||||
|
||||
@ -3763,12 +3763,12 @@ esxDomainMigratePrepare(virConnectPtr dconn,
|
||||
|
||||
static int
|
||||
esxDomainMigratePerform(virDomainPtr domain,
|
||||
const char *cookie ATTRIBUTE_UNUSED,
|
||||
int cookielen ATTRIBUTE_UNUSED,
|
||||
const char *cookie G_GNUC_UNUSED,
|
||||
int cookielen G_GNUC_UNUSED,
|
||||
const char *uri,
|
||||
unsigned long flags,
|
||||
const char *dname,
|
||||
unsigned long bandwidth ATTRIBUTE_UNUSED)
|
||||
unsigned long bandwidth G_GNUC_UNUSED)
|
||||
{
|
||||
int result = -1;
|
||||
esxPrivate *priv = domain->conn->privateData;
|
||||
@ -3906,9 +3906,9 @@ esxDomainMigratePerform(virDomainPtr domain,
|
||||
|
||||
static virDomainPtr
|
||||
esxDomainMigrateFinish(virConnectPtr dconn, const char *dname,
|
||||
const char *cookie ATTRIBUTE_UNUSED,
|
||||
int cookielen ATTRIBUTE_UNUSED,
|
||||
const char *uri ATTRIBUTE_UNUSED,
|
||||
const char *cookie G_GNUC_UNUSED,
|
||||
int cookielen G_GNUC_UNUSED,
|
||||
const char *uri G_GNUC_UNUSED,
|
||||
unsigned long flags)
|
||||
{
|
||||
virCheckFlags(ESX_MIGRATION_FLAGS, NULL);
|
||||
@ -4060,7 +4060,7 @@ esxDomainIsPersistent(virDomainPtr domain)
|
||||
|
||||
|
||||
static int
|
||||
esxDomainIsUpdated(virDomainPtr domain ATTRIBUTE_UNUSED)
|
||||
esxDomainIsUpdated(virDomainPtr domain G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX domains never have a persistent state that differs from
|
||||
* current state. However, we do want to check for existence. */
|
||||
|
@ -107,7 +107,7 @@ esxConnectListInterfaces(virConnectPtr conn, char **const names, int maxnames)
|
||||
|
||||
|
||||
static int
|
||||
esxConnectNumOfDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
esxConnectNumOfDefinedInterfaces(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX interfaces are always active */
|
||||
return 0;
|
||||
@ -116,9 +116,9 @@ esxConnectNumOfDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
esxConnectListDefinedInterfaces(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
char **const names ATTRIBUTE_UNUSED,
|
||||
int maxnames ATTRIBUTE_UNUSED)
|
||||
esxConnectListDefinedInterfaces(virConnectPtr conn G_GNUC_UNUSED,
|
||||
char **const names G_GNUC_UNUSED,
|
||||
int maxnames G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX interfaces are always active */
|
||||
return 0;
|
||||
@ -250,7 +250,7 @@ esxInterfaceGetXMLDesc(virInterfacePtr iface, unsigned int flags)
|
||||
|
||||
|
||||
static int
|
||||
esxInterfaceIsActive(virInterfacePtr iface ATTRIBUTE_UNUSED)
|
||||
esxInterfaceIsActive(virInterfacePtr iface G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX interfaces are always active */
|
||||
return 1;
|
||||
|
@ -115,7 +115,7 @@ esxConnectListNetworks(virConnectPtr conn, char **const names, int maxnames)
|
||||
|
||||
|
||||
static int
|
||||
esxConnectNumOfDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
esxConnectNumOfDefinedNetworks(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX networks are always active */
|
||||
return 0;
|
||||
@ -124,9 +124,9 @@ esxConnectNumOfDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
esxConnectListDefinedNetworks(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
char **const names ATTRIBUTE_UNUSED,
|
||||
int maxnames ATTRIBUTE_UNUSED)
|
||||
esxConnectListDefinedNetworks(virConnectPtr conn G_GNUC_UNUSED,
|
||||
char **const names G_GNUC_UNUSED,
|
||||
int maxnames G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX networks are always active */
|
||||
return 0;
|
||||
@ -823,7 +823,7 @@ esxNetworkGetXMLDesc(virNetworkPtr network_, unsigned int flags)
|
||||
|
||||
|
||||
static int
|
||||
esxNetworkGetAutostart(virNetworkPtr network ATTRIBUTE_UNUSED,
|
||||
esxNetworkGetAutostart(virNetworkPtr network G_GNUC_UNUSED,
|
||||
int *autostart)
|
||||
{
|
||||
/* ESX networks are always active */
|
||||
@ -835,7 +835,7 @@ esxNetworkGetAutostart(virNetworkPtr network ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static int
|
||||
esxNetworkSetAutostart(virNetworkPtr network ATTRIBUTE_UNUSED,
|
||||
esxNetworkSetAutostart(virNetworkPtr network G_GNUC_UNUSED,
|
||||
int autostart)
|
||||
{
|
||||
/* Just accept autostart activation, but fail on autostart deactivation */
|
||||
@ -853,7 +853,7 @@ esxNetworkSetAutostart(virNetworkPtr network ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static int
|
||||
esxNetworkIsActive(virNetworkPtr network ATTRIBUTE_UNUSED)
|
||||
esxNetworkIsActive(virNetworkPtr network G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX networks are always active */
|
||||
return 1;
|
||||
@ -862,7 +862,7 @@ esxNetworkIsActive(virNetworkPtr network ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
esxNetworkIsPersistent(virNetworkPtr network ATTRIBUTE_UNUSED)
|
||||
esxNetworkIsPersistent(virNetworkPtr network G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX has no concept of transient networks, so all of them are persistent */
|
||||
return 1;
|
||||
|
@ -276,7 +276,7 @@ esxStoragePoolRefresh(virStoragePoolPtr pool,
|
||||
|
||||
|
||||
static int
|
||||
esxStoragePoolGetInfo(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
esxStoragePoolGetInfo(virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
virStoragePoolInfoPtr info)
|
||||
{
|
||||
/* These fields are not valid for iSCSI pool */
|
||||
@ -582,8 +582,8 @@ esxStorageVolLookupByKey(virConnectPtr conn, const char *key)
|
||||
|
||||
|
||||
static virStorageVolPtr
|
||||
esxStorageVolCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
const char *xmldesc ATTRIBUTE_UNUSED,
|
||||
esxStorageVolCreateXML(virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
const char *xmldesc G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(0, NULL);
|
||||
@ -597,9 +597,9 @@ esxStorageVolCreateXML(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static virStorageVolPtr
|
||||
esxStorageVolCreateXMLFrom(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
const char *xmldesc ATTRIBUTE_UNUSED,
|
||||
virStorageVolPtr sourceVolume ATTRIBUTE_UNUSED,
|
||||
esxStorageVolCreateXMLFrom(virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
const char *xmldesc G_GNUC_UNUSED,
|
||||
virStorageVolPtr sourceVolume G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(0, NULL);
|
||||
@ -733,7 +733,7 @@ esxStorageVolGetXMLDesc(virStorageVolPtr volume,
|
||||
|
||||
|
||||
static int
|
||||
esxStorageVolDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
|
||||
esxStorageVolDelete(virStorageVolPtr volume G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(0, -1);
|
||||
@ -747,7 +747,7 @@ esxStorageVolDelete(virStorageVolPtr volume ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static int
|
||||
esxStorageVolWipe(virStorageVolPtr volume ATTRIBUTE_UNUSED,
|
||||
esxStorageVolWipe(virStorageVolPtr volume G_GNUC_UNUSED,
|
||||
unsigned int flags)
|
||||
{
|
||||
virCheckFlags(0, -1);
|
||||
|
@ -117,7 +117,7 @@ esxConnectListStoragePools(virConnectPtr conn, char **const names, int maxnames)
|
||||
|
||||
|
||||
static int
|
||||
esxConnectNumOfDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
esxConnectNumOfDefinedStoragePools(virConnectPtr conn G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX storage pools are always active */
|
||||
return 0;
|
||||
@ -126,9 +126,9 @@ esxConnectNumOfDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
esxConnectListDefinedStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
char **const names ATTRIBUTE_UNUSED,
|
||||
int maxnames ATTRIBUTE_UNUSED)
|
||||
esxConnectListDefinedStoragePools(virConnectPtr conn G_GNUC_UNUSED,
|
||||
char **const names G_GNUC_UNUSED,
|
||||
int maxnames G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX storage pools are always active */
|
||||
return 0;
|
||||
@ -251,7 +251,7 @@ esxStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
|
||||
|
||||
|
||||
static int
|
||||
esxStoragePoolGetAutostart(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
esxStoragePoolGetAutostart(virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
int *autostart)
|
||||
{
|
||||
/* ESX storage pools are always active */
|
||||
@ -263,7 +263,7 @@ esxStoragePoolGetAutostart(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static int
|
||||
esxStoragePoolSetAutostart(virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
esxStoragePoolSetAutostart(virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
int autostart)
|
||||
{
|
||||
/* Just accept autostart activation, but fail on autostart deactivation */
|
||||
@ -500,7 +500,7 @@ esxStorageVolGetPath(virStorageVolPtr volume)
|
||||
|
||||
|
||||
static int
|
||||
esxStoragePoolIsActive(virStoragePoolPtr pool ATTRIBUTE_UNUSED)
|
||||
esxStoragePoolIsActive(virStoragePoolPtr pool G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX storage pools are always active */
|
||||
return 1;
|
||||
@ -509,7 +509,7 @@ esxStoragePoolIsActive(virStoragePoolPtr pool ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
esxStoragePoolIsPersistent(virStoragePoolPtr pool ATTRIBUTE_UNUSED)
|
||||
esxStoragePoolIsPersistent(virStoragePoolPtr pool G_GNUC_UNUSED)
|
||||
{
|
||||
/* ESX has no concept of transient pools, so all of them are persistent */
|
||||
return 1;
|
||||
|
@ -64,7 +64,7 @@ VIR_LOG_INIT("esx.esx_vi");
|
||||
void \
|
||||
esxVI_##_type##_Free(esxVI_##_type **ptrptr) \
|
||||
{ \
|
||||
esxVI_##_type *item ATTRIBUTE_UNUSED; \
|
||||
esxVI_##_type *item G_GNUC_UNUSED; \
|
||||
\
|
||||
if (!ptrptr || !(*ptrptr)) { \
|
||||
return; \
|
||||
@ -167,8 +167,8 @@ esxVI_CURL_WriteBuffer(char *data, size_t size, size_t nmemb, void *userdata)
|
||||
|
||||
#if ESX_VI__CURL__ENABLE_DEBUG_OUTPUT
|
||||
static int
|
||||
esxVI_CURL_Debug(CURL *curl ATTRIBUTE_UNUSED, curl_infotype type,
|
||||
char *info, size_t size, void *userdata ATTRIBUTE_UNUSED)
|
||||
esxVI_CURL_Debug(CURL *curl G_GNUC_UNUSED, curl_infotype type,
|
||||
char *info, size_t size, void *userdata G_GNUC_UNUSED)
|
||||
{
|
||||
char *buffer = NULL;
|
||||
|
||||
@ -475,8 +475,8 @@ esxVI_CURL_Upload(esxVI_CURL *curl, const char *url, const char *content)
|
||||
*/
|
||||
|
||||
static void
|
||||
esxVI_SharedCURL_Lock(CURL *handle ATTRIBUTE_UNUSED, curl_lock_data data,
|
||||
curl_lock_access access_ ATTRIBUTE_UNUSED, void *userptr)
|
||||
esxVI_SharedCURL_Lock(CURL *handle G_GNUC_UNUSED, curl_lock_data data,
|
||||
curl_lock_access access_ G_GNUC_UNUSED, void *userptr)
|
||||
{
|
||||
size_t i;
|
||||
esxVI_SharedCURL *shared = userptr;
|
||||
@ -503,7 +503,7 @@ esxVI_SharedCURL_Lock(CURL *handle ATTRIBUTE_UNUSED, curl_lock_data data,
|
||||
}
|
||||
|
||||
static void
|
||||
esxVI_SharedCURL_Unlock(CURL *handle ATTRIBUTE_UNUSED, curl_lock_data data,
|
||||
esxVI_SharedCURL_Unlock(CURL *handle G_GNUC_UNUSED, curl_lock_data data,
|
||||
void *userptr)
|
||||
{
|
||||
size_t i;
|
||||
@ -649,10 +649,10 @@ esxVI_SharedCURL_Remove(esxVI_SharedCURL *shared, esxVI_CURL *curl)
|
||||
#if ESX_EMULATE_CURL_MULTI_WAIT
|
||||
|
||||
static int
|
||||
esxVI_MultiCURL_SocketCallback(CURL *handle ATTRIBUTE_UNUSED,
|
||||
esxVI_MultiCURL_SocketCallback(CURL *handle G_GNUC_UNUSED,
|
||||
curl_socket_t fd, int action,
|
||||
void *callback_opaque,
|
||||
void *socket_opaque ATTRIBUTE_UNUSED)
|
||||
void *socket_opaque G_GNUC_UNUSED)
|
||||
{
|
||||
esxVI_MultiCURL *multi = callback_opaque;
|
||||
size_t i;
|
||||
@ -695,8 +695,8 @@ esxVI_MultiCURL_SocketCallback(CURL *handle ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static int
|
||||
esxVI_MultiCURL_TimerCallback(CURLM *handle ATTRIBUTE_UNUSED,
|
||||
long timeout_ms ATTRIBUTE_UNUSED,
|
||||
esxVI_MultiCURL_TimerCallback(CURLM *handle G_GNUC_UNUSED,
|
||||
long timeout_ms G_GNUC_UNUSED,
|
||||
void *callback_opaque)
|
||||
{
|
||||
esxVI_MultiCURL *multi = callback_opaque;
|
||||
|
@ -58,7 +58,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
|
||||
void \
|
||||
esxVI_##_type##_Free(esxVI_##_type **ptrptr) \
|
||||
{ \
|
||||
esxVI_##_type *item ATTRIBUTE_UNUSED; \
|
||||
esxVI_##_type *item G_GNUC_UNUSED; \
|
||||
\
|
||||
if (!ptrptr || !(*ptrptr)) { \
|
||||
return; \
|
||||
@ -185,7 +185,7 @@ VIR_LOG_INIT("esx.esx_vi_types");
|
||||
esxVI_##_type##_Cast##_dest_extra##FromAnyType(esxVI_AnyType *anyType, \
|
||||
_dest_type **ptrptr) \
|
||||
{ \
|
||||
_dest_type *item ATTRIBUTE_UNUSED; \
|
||||
_dest_type *item G_GNUC_UNUSED; \
|
||||
\
|
||||
if (!anyType || !ptrptr || *ptrptr) { \
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", \
|
||||
|
Loading…
Reference in New Issue
Block a user