提交 cdf7be47 编写于 作者: J Ján Tomko

storage: use G_GNUC_UNUSED

Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 bfefd2cb
......@@ -106,7 +106,7 @@ virStorageDriverLoadBackendModule(const char *name,
return -1
int
virStorageBackendDriversRegister(bool allbackends ATTRIBUTE_UNUSED)
virStorageBackendDriversRegister(bool allbackends G_GNUC_UNUSED)
{
#if WITH_STORAGE_DIR || WITH_STORAGE_FS
VIR_STORAGE_BACKEND_REGISTER(virStorageBackendFsRegister, "fs");
......
......@@ -41,7 +41,7 @@ VIR_LOG_INIT("storage.storage_backend_disk");
static bool
virStorageVolPartFindExtended(virStorageVolDefPtr def,
const void *opaque ATTRIBUTE_UNUSED)
const void *opaque G_GNUC_UNUSED)
{
if (def->source.partType == VIR_STORAGE_VOL_DISK_TYPE_EXTENDED)
return true;
......@@ -286,7 +286,7 @@ struct virStorageBackendDiskPoolVolData {
};
static int
virStorageBackendDiskMakeVol(size_t ntok ATTRIBUTE_UNUSED,
virStorageBackendDiskMakeVol(size_t ntok G_GNUC_UNUSED,
char **const groups,
void *opaque)
{
......@@ -391,7 +391,7 @@ virStorageBackendDiskReadPartitions(virStoragePoolObjPtr pool,
}
static int
virStorageBackendDiskMakePoolGeometry(size_t ntok ATTRIBUTE_UNUSED,
virStorageBackendDiskMakePoolGeometry(size_t ntok G_GNUC_UNUSED,
char **const groups,
void *data)
{
......
......@@ -438,8 +438,8 @@ virStorageBackendExecuteMKFS(const char *device,
}
#else /* #ifdef MKFS */
static int
virStorageBackendExecuteMKFS(const char *device ATTRIBUTE_UNUSED,
const char *format ATTRIBUTE_UNUSED)
virStorageBackendExecuteMKFS(const char *device G_GNUC_UNUSED,
const char *format G_GNUC_UNUSED)
{
virReportError(VIR_ERR_INTERNAL_ERROR,
_("mkfs is not supported on this platform: "
......
......@@ -543,7 +543,7 @@ virStorageBackendLogicalGetPoolSources(virStoragePoolSourceListPtr sourceList)
static char *
virStorageBackendLogicalFindPoolSources(const char *srcSpec ATTRIBUTE_UNUSED,
virStorageBackendLogicalFindPoolSources(const char *srcSpec G_GNUC_UNUSED,
unsigned int flags)
{
virStoragePoolSourceList sourceList;
......@@ -837,7 +837,7 @@ virStorageBackendLogicalDeletePool(virStoragePoolObjPtr pool,
static int
virStorageBackendLogicalDeleteVol(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendLogicalDeleteVol(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
unsigned int flags)
{
......
......@@ -233,7 +233,7 @@ virStorageBackendGetMaps(virStoragePoolObjPtr pool)
}
static int
virStorageBackendMpathCheckPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendMpathCheckPool(virStoragePoolObjPtr pool G_GNUC_UNUSED,
bool *isActive)
{
*isActive = virFileExists("/dev/mapper") ||
......
......@@ -450,7 +450,7 @@ volStorageBackendRBDUseFastDiff(uint64_t features, uint64_t flags)
}
static int
virStorageBackendRBDRefreshVolInfoCb(uint64_t offset ATTRIBUTE_UNUSED,
virStorageBackendRBDRefreshVolInfoCb(uint64_t offset G_GNUC_UNUSED,
size_t len,
int exists,
void *arg)
......@@ -490,8 +490,8 @@ virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol,
#else
static int
volStorageBackendRBDGetFlags(rbd_image_t image ATTRIBUTE_UNUSED,
const char *volname ATTRIBUTE_UNUSED,
volStorageBackendRBDGetFlags(rbd_image_t image G_GNUC_UNUSED,
const char *volname G_GNUC_UNUSED,
uint64_t *flags)
{
*flags = 0;
......@@ -499,16 +499,16 @@ volStorageBackendRBDGetFlags(rbd_image_t image ATTRIBUTE_UNUSED,
}
static int
volStorageBackendRBDUseFastDiff(uint64_t features ATTRIBUTE_UNUSED,
uint64_t feature_flags ATTRIBUTE_UNUSED)
volStorageBackendRBDUseFastDiff(uint64_t features G_GNUC_UNUSED,
uint64_t feature_flags G_GNUC_UNUSED)
{
return false;
}
static int
virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol ATTRIBUTE_UNUSED,
rbd_image_t *image ATTRIBUTE_UNUSED,
rbd_image_info_t *info ATTRIBUTE_UNUSED)
virStorageBackendRBDSetAllocation(virStorageVolDefPtr vol G_GNUC_UNUSED,
rbd_image_t *image G_GNUC_UNUSED,
rbd_image_info_t *info G_GNUC_UNUSED)
{
return false;
}
......@@ -1013,9 +1013,9 @@ virStorageBackendRBDImageInfo(rbd_image_t image,
/* Callback function for rbd_diff_iterate() */
static int
virStorageBackendRBDIterateCb(uint64_t offset ATTRIBUTE_UNUSED,
size_t length ATTRIBUTE_UNUSED,
int exists ATTRIBUTE_UNUSED,
virStorageBackendRBDIterateCb(uint64_t offset G_GNUC_UNUSED,
size_t length G_GNUC_UNUSED,
int exists G_GNUC_UNUSED,
void *arg)
{
/*
......
......@@ -81,7 +81,7 @@ virStorageBackendZFSVolModeNeeded(void)
}
static int
virStorageBackendZFSCheckPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendZFSCheckPool(virStoragePoolObjPtr pool G_GNUC_UNUSED,
bool *isActive)
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
......@@ -218,7 +218,7 @@ virStorageBackendZFSFindVols(virStoragePoolObjPtr pool,
}
static int
virStorageBackendZFSRefreshPool(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED)
virStorageBackendZFSRefreshPool(virStoragePoolObjPtr pool G_GNUC_UNUSED)
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool);
char *zpool_props = NULL;
......
......@@ -132,7 +132,7 @@ virStoragePoolUpdateInactive(virStoragePoolObjPtr obj)
static void
storagePoolUpdateStateCallback(virStoragePoolObjPtr obj,
const void *opaque ATTRIBUTE_UNUSED)
const void *opaque G_GNUC_UNUSED)
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(obj);
bool active = false;
......@@ -191,7 +191,7 @@ storagePoolUpdateAllState(void)
static void
storageDriverAutostartCallback(virStoragePoolObjPtr obj,
const void *opaque ATTRIBUTE_UNUSED)
const void *opaque G_GNUC_UNUSED)
{
virStoragePoolDefPtr def = virStoragePoolObjGetDef(obj);
virStorageBackendPtr backend;
......@@ -253,8 +253,8 @@ storageDriverAutostart(void)
*/
static int
storageStateInitialize(bool privileged,
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED)
virStateInhibitCallback callback G_GNUC_UNUSED,
void *opaque G_GNUC_UNUSED)
{
VIR_AUTOFREE(char *) configdir = NULL;
VIR_AUTOFREE(char *) rundir = NULL;
......@@ -404,8 +404,8 @@ storageStateCleanup(void)
static virDrvOpenStatus
storageConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
virConfPtr conf ATTRIBUTE_UNUSED,
virConnectAuthPtr auth G_GNUC_UNUSED,
virConfPtr conf G_GNUC_UNUSED,
unsigned int flags)
{
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
......@@ -427,27 +427,27 @@ storageConnectOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS;
}
static int storageConnectClose(virConnectPtr conn ATTRIBUTE_UNUSED)
static int storageConnectClose(virConnectPtr conn G_GNUC_UNUSED)
{
return 0;
}
static int storageConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
static int storageConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
{
/* Trivially secure, since always inside the daemon */
return 1;
}
static int storageConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
static int storageConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
{
/* Not encrypted, but remote driver takes care of that */
return 0;
}
static int storageConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static int storageConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
{
return 1;
}
......@@ -2377,7 +2377,7 @@ virStorageVolPoolRefreshThread(void *opaque)
* @opaque Buffer to hold the pool name to be refreshed
*/
static void
virStorageVolFDStreamCloseCb(virStreamPtr st ATTRIBUTE_UNUSED,
virStorageVolFDStreamCloseCb(virStreamPtr st G_GNUC_UNUSED,
void *opaque)
{
virThread thread;
......
......@@ -113,8 +113,8 @@ reflinkCloneFile(int dest_fd, int src_fd)
}
#else
static inline int
reflinkCloneFile(int dest_fd ATTRIBUTE_UNUSED,
int src_fd ATTRIBUTE_UNUSED)
reflinkCloneFile(int dest_fd G_GNUC_UNUSED,
int src_fd G_GNUC_UNUSED)
{
errno = ENOTSUP;
return -1;
......@@ -236,7 +236,7 @@ virStorageBackendCopyToFD(virStorageVolDefPtr vol,
}
static int
storageBackendCreateBlockFrom(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
storageBackendCreateBlockFrom(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
virStorageVolDefPtr inputvol,
unsigned int flags)
......@@ -591,7 +591,7 @@ virStorageBackendCreateExecCommand(virStoragePoolObjPtr pool,
/* Create ploop directory with ploop image and DiskDescriptor.xml
* if function fails to create image file the directory will be deleted.*/
static int
storageBackendCreatePloop(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
storageBackendCreatePloop(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
virStorageVolDefPtr inputvol,
unsigned int flags)
......@@ -2136,7 +2136,7 @@ virStorageBackendVolBuildFromLocal(virStoragePoolObjPtr pool,
* Remove a volume - no support for BLOCK and NETWORK yet
*/
int
virStorageBackendVolDeleteLocal(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendVolDeleteLocal(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
unsigned int flags)
{
......@@ -2237,7 +2237,7 @@ storageBackendLoadDefaultSecrets(virStorageVolDefPtr vol)
* Update info about a volume's capacity/allocation
*/
int
virStorageBackendVolRefreshLocal(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendVolRefreshLocal(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol)
{
int ret;
......@@ -2407,7 +2407,7 @@ storageBackendPloopHasSnapshots(char *path)
int
virStorageBackendVolUploadLocal(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendVolUploadLocal(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
virStreamPtr stream,
unsigned long long offset,
......@@ -2448,7 +2448,7 @@ virStorageBackendVolUploadLocal(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
}
int
virStorageBackendVolDownloadLocal(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendVolDownloadLocal(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
virStreamPtr stream,
unsigned long long offset,
......@@ -2716,7 +2716,7 @@ storageBackendVolWipePloop(virStorageVolDefPtr vol,
int
virStorageBackendVolWipeLocal(virStoragePoolObjPtr pool ATTRIBUTE_UNUSED,
virStorageBackendVolWipeLocal(virStoragePoolObjPtr pool G_GNUC_UNUSED,
virStorageVolDefPtr vol,
unsigned int algorithm,
unsigned int flags)
......@@ -3145,9 +3145,9 @@ virStorageBackendBLKIDFindEmpty(const char *device,
#else /* #if WITH_BLKID */
static int
virStorageBackendBLKIDFindEmpty(const char *device ATTRIBUTE_UNUSED,
const char *format ATTRIBUTE_UNUSED,
bool writelabel ATTRIBUTE_UNUSED)
virStorageBackendBLKIDFindEmpty(const char *device G_GNUC_UNUSED,
const char *format G_GNUC_UNUSED,
bool writelabel G_GNUC_UNUSED)
{
return -2;
}
......@@ -3303,9 +3303,9 @@ virStorageBackendPARTEDValidLabel(const char *device,
#else
static int
virStorageBackendPARTEDValidLabel(const char *device ATTRIBUTE_UNUSED,
const char *format ATTRIBUTE_UNUSED,
bool writelabel ATTRIBUTE_UNUSED)
virStorageBackendPARTEDValidLabel(const char *device G_GNUC_UNUSED,
const char *format G_GNUC_UNUSED,
bool writelabel G_GNUC_UNUSED)
{
return -2;
}
......@@ -3658,7 +3658,7 @@ virStorageBackendSCSISerial(const char *dev,
*/
static int
virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
uint32_t host ATTRIBUTE_UNUSED,
uint32_t host G_GNUC_UNUSED,
uint32_t bus,
uint32_t target,
uint32_t lun,
......@@ -3750,7 +3750,7 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
static int
getNewStyleBlockDevice(const char *lun_path,
const char *block_name ATTRIBUTE_UNUSED,
const char *block_name G_GNUC_UNUSED,
char **block_device)
{
DIR *block_dir = NULL;
......@@ -3788,7 +3788,7 @@ getNewStyleBlockDevice(const char *lun_path,
static int
getOldStyleBlockDevice(const char *lun_path ATTRIBUTE_UNUSED,
getOldStyleBlockDevice(const char *lun_path G_GNUC_UNUSED,
const char *block_name,
char **block_device)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册