lxc: 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
227d405d1d
commit
aa9a313a72
@ -272,7 +272,7 @@ struct _virLXCCgroupDevicePolicy {
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virLXCSetupHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
virLXCSetupHostUSBDeviceCgroup(virUSBDevicePtr dev G_GNUC_UNUSED,
|
||||||
const char *path,
|
const char *path,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
@ -288,7 +288,7 @@ virLXCSetupHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev ATTRIBUTE_UNUSED,
|
virLXCTeardownHostUSBDeviceCgroup(virUSBDevicePtr dev G_GNUC_UNUSED,
|
||||||
const char *path,
|
const char *path,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
@ -1035,8 +1035,8 @@ static int lxcContainerMountProcFuse(virDomainDefPtr def,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int lxcContainerMountProcFuse(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
static int lxcContainerMountProcFuse(virDomainDefPtr def G_GNUC_UNUSED,
|
||||||
const char *stateDir ATTRIBUTE_UNUSED)
|
const char *stateDir G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1305,7 +1305,7 @@ lxcContainerMountDetectFilesystem(const char *src, char **type)
|
|||||||
}
|
}
|
||||||
#else /* ! WITH_BLKID */
|
#else /* ! WITH_BLKID */
|
||||||
static int
|
static int
|
||||||
lxcContainerMountDetectFilesystem(const char *src ATTRIBUTE_UNUSED,
|
lxcContainerMountDetectFilesystem(const char *src G_GNUC_UNUSED,
|
||||||
char **type)
|
char **type)
|
||||||
{
|
{
|
||||||
/* No libblkid, so just return success with no detected type */
|
/* No libblkid, so just return success with no detected type */
|
||||||
@ -2083,8 +2083,8 @@ static int lxcContainerDropCapabilities(virDomainDefPtr def,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static int lxcContainerDropCapabilities(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
static int lxcContainerDropCapabilities(virDomainDefPtr def G_GNUC_UNUSED,
|
||||||
bool keepReboot ATTRIBUTE_UNUSED)
|
bool keepReboot G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
VIR_WARN("libcap-ng support not compiled in, unable to clear capabilities");
|
VIR_WARN("libcap-ng support not compiled in, unable to clear capabilities");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -150,7 +150,7 @@ static void virLXCControllerFree(virLXCControllerPtr ctrl);
|
|||||||
static int virLXCControllerEventSendInit(virLXCControllerPtr ctrl,
|
static int virLXCControllerEventSendInit(virLXCControllerPtr ctrl,
|
||||||
pid_t initpid);
|
pid_t initpid);
|
||||||
|
|
||||||
static void virLXCControllerQuitTimer(int timer ATTRIBUTE_UNUSED, void *opaque)
|
static void virLXCControllerQuitTimer(int timer G_GNUC_UNUSED, void *opaque)
|
||||||
{
|
{
|
||||||
virLXCControllerPtr ctrl = opaque;
|
virLXCControllerPtr ctrl = opaque;
|
||||||
|
|
||||||
@ -1027,7 +1027,7 @@ static virMutex lock = VIR_MUTEX_INITIALIZER;
|
|||||||
|
|
||||||
|
|
||||||
static void virLXCControllerSignalChildIO(virNetDaemonPtr dmn,
|
static void virLXCControllerSignalChildIO(virNetDaemonPtr dmn,
|
||||||
siginfo_t *info ATTRIBUTE_UNUSED,
|
siginfo_t *info G_GNUC_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virLXCControllerPtr ctrl = opaque;
|
virLXCControllerPtr ctrl = opaque;
|
||||||
|
@ -84,7 +84,7 @@ virLXCDomainObjFreeJob(virLXCDomainObjPrivatePtr priv)
|
|||||||
* Successful calls must be followed by EndJob eventually.
|
* Successful calls must be followed by EndJob eventually.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
virLXCDomainObjBeginJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
|
virLXCDomainObjBeginJob(virLXCDriverPtr driver G_GNUC_UNUSED,
|
||||||
virDomainObjPtr obj,
|
virDomainObjPtr obj,
|
||||||
enum virLXCDomainJob job)
|
enum virLXCDomainJob job)
|
||||||
{
|
{
|
||||||
@ -136,7 +136,7 @@ virLXCDomainObjBeginJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
|
|||||||
* earlier virLXCDomainBeginJob() call
|
* earlier virLXCDomainBeginJob() call
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
|
virLXCDomainObjEndJob(virLXCDriverPtr driver G_GNUC_UNUSED,
|
||||||
virDomainObjPtr obj)
|
virDomainObjPtr obj)
|
||||||
{
|
{
|
||||||
virLXCDomainObjPrivatePtr priv = obj->privateData;
|
virLXCDomainObjPrivatePtr priv = obj->privateData;
|
||||||
@ -151,7 +151,7 @@ virLXCDomainObjEndJob(virLXCDriverPtr driver ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
virLXCDomainObjPrivateAlloc(void *opaque ATTRIBUTE_UNUSED)
|
virLXCDomainObjPrivateAlloc(void *opaque G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
virLXCDomainObjPrivatePtr priv;
|
virLXCDomainObjPrivatePtr priv;
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ virLXCDomainObjPrivateXMLFormat(virBufferPtr buf,
|
|||||||
static int
|
static int
|
||||||
virLXCDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
virLXCDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
|
||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
virDomainDefParserConfigPtr config ATTRIBUTE_UNUSED)
|
virDomainDefParserConfigPtr config G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
virLXCDomainObjPrivatePtr priv = vm->privateData;
|
virLXCDomainObjPrivatePtr priv = vm->privateData;
|
||||||
long long thepid;
|
long long thepid;
|
||||||
@ -352,9 +352,9 @@ virDomainXMLPrivateDataCallbacks virLXCDriverPrivateDataCallbacks = {
|
|||||||
static int
|
static int
|
||||||
virLXCDomainDefPostParse(virDomainDefPtr def,
|
virLXCDomainDefPostParse(virDomainDefPtr def,
|
||||||
virCapsPtr caps,
|
virCapsPtr caps,
|
||||||
unsigned int parseFlags ATTRIBUTE_UNUSED,
|
unsigned int parseFlags G_GNUC_UNUSED,
|
||||||
void *opaque ATTRIBUTE_UNUSED,
|
void *opaque G_GNUC_UNUSED,
|
||||||
void *parseOpaque ATTRIBUTE_UNUSED)
|
void *parseOpaque G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
/* check for emulator and create a default one if needed */
|
/* check for emulator and create a default one if needed */
|
||||||
if (!def->emulator &&
|
if (!def->emulator &&
|
||||||
@ -367,11 +367,11 @@ virLXCDomainDefPostParse(virDomainDefPtr def,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
virLXCDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
virLXCDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
||||||
const virDomainDef *def ATTRIBUTE_UNUSED,
|
const virDomainDef *def G_GNUC_UNUSED,
|
||||||
virCapsPtr caps ATTRIBUTE_UNUSED,
|
virCapsPtr caps G_GNUC_UNUSED,
|
||||||
unsigned int parseFlags ATTRIBUTE_UNUSED,
|
unsigned int parseFlags G_GNUC_UNUSED,
|
||||||
void *opaque ATTRIBUTE_UNUSED,
|
void *opaque G_GNUC_UNUSED,
|
||||||
void *parseOpaque ATTRIBUTE_UNUSED)
|
void *parseOpaque G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
if (dev->type == VIR_DOMAIN_DEVICE_CHR &&
|
if (dev->type == VIR_DOMAIN_DEVICE_CHR &&
|
||||||
dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
|
dev->data.chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE &&
|
||||||
@ -415,7 +415,7 @@ struct _lxcDomainInitctlCallbackData {
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
lxcDomainInitctlCallback(pid_t pid ATTRIBUTE_UNUSED,
|
lxcDomainInitctlCallback(pid_t pid G_GNUC_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
lxcDomainInitctlCallbackData *data = opaque;
|
lxcDomainInitctlCallbackData *data = opaque;
|
||||||
|
@ -133,8 +133,8 @@ lxcConnectURIProbe(char **uri)
|
|||||||
|
|
||||||
|
|
||||||
static virDrvOpenStatus lxcConnectOpen(virConnectPtr conn,
|
static virDrvOpenStatus lxcConnectOpen(virConnectPtr conn,
|
||||||
virConnectAuthPtr auth ATTRIBUTE_UNUSED,
|
virConnectAuthPtr auth G_GNUC_UNUSED,
|
||||||
virConfPtr conf ATTRIBUTE_UNUSED,
|
virConfPtr conf G_GNUC_UNUSED,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
|
||||||
@ -174,21 +174,21 @@ static int lxcConnectClose(virConnectPtr conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int lxcConnectIsSecure(virConnectPtr conn ATTRIBUTE_UNUSED)
|
static int lxcConnectIsSecure(virConnectPtr conn G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
/* Trivially secure, since always inside the daemon */
|
/* Trivially secure, since always inside the daemon */
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int lxcConnectIsEncrypted(virConnectPtr conn ATTRIBUTE_UNUSED)
|
static int lxcConnectIsEncrypted(virConnectPtr conn G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
/* Not encrypted, but remote driver takes care of that */
|
/* Not encrypted, but remote driver takes care of that */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int lxcConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
|
static int lxcConnectIsAlive(virConnectPtr conn G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -1536,8 +1536,8 @@ lxcSecurityInit(virLXCDriverConfigPtr cfg)
|
|||||||
|
|
||||||
|
|
||||||
static int lxcStateInitialize(bool privileged,
|
static int lxcStateInitialize(bool privileged,
|
||||||
virStateInhibitCallback callback ATTRIBUTE_UNUSED,
|
virStateInhibitCallback callback G_GNUC_UNUSED,
|
||||||
void *opaque ATTRIBUTE_UNUSED)
|
void *opaque G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
virCapsPtr caps = NULL;
|
virCapsPtr caps = NULL;
|
||||||
virLXCDriverConfigPtr cfg = NULL;
|
virLXCDriverConfigPtr cfg = NULL;
|
||||||
@ -3577,7 +3577,7 @@ struct lxcDomainAttachDeviceMknodData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
lxcDomainAttachDeviceMknodHelper(pid_t pid ATTRIBUTE_UNUSED,
|
lxcDomainAttachDeviceMknodHelper(pid_t pid G_GNUC_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
struct lxcDomainAttachDeviceMknodData *data = opaque;
|
struct lxcDomainAttachDeviceMknodData *data = opaque;
|
||||||
@ -3685,7 +3685,7 @@ lxcDomainAttachDeviceMknod(virLXCDriverPtr driver,
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
lxcDomainAttachDeviceUnlinkHelper(pid_t pid ATTRIBUTE_UNUSED,
|
lxcDomainAttachDeviceUnlinkHelper(pid_t pid G_GNUC_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
const char *path = opaque;
|
const char *path = opaque;
|
||||||
|
@ -82,8 +82,8 @@ static int lxcProcGetattr(const char *path, struct stat *stbuf)
|
|||||||
|
|
||||||
static int lxcProcReaddir(const char *path, void *buf,
|
static int lxcProcReaddir(const char *path, void *buf,
|
||||||
fuse_fill_dir_t filler,
|
fuse_fill_dir_t filler,
|
||||||
off_t offset ATTRIBUTE_UNUSED,
|
off_t offset G_GNUC_UNUSED,
|
||||||
struct fuse_file_info *fi ATTRIBUTE_UNUSED)
|
struct fuse_file_info *fi G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
if (STRNEQ(path, "/"))
|
if (STRNEQ(path, "/"))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
@ -95,8 +95,8 @@ static int lxcProcReaddir(const char *path, void *buf,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lxcProcOpen(const char *path ATTRIBUTE_UNUSED,
|
static int lxcProcOpen(const char *path G_GNUC_UNUSED,
|
||||||
struct fuse_file_info *fi ATTRIBUTE_UNUSED)
|
struct fuse_file_info *fi G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
if (STRNEQ(path, fuse_meminfo_path))
|
if (STRNEQ(path, fuse_meminfo_path))
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
@ -240,11 +240,11 @@ static int lxcProcReadMeminfo(char *hostpath, virDomainDefPtr def,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lxcProcRead(const char *path ATTRIBUTE_UNUSED,
|
static int lxcProcRead(const char *path G_GNUC_UNUSED,
|
||||||
char *buf ATTRIBUTE_UNUSED,
|
char *buf G_GNUC_UNUSED,
|
||||||
size_t size ATTRIBUTE_UNUSED,
|
size_t size G_GNUC_UNUSED,
|
||||||
off_t offset ATTRIBUTE_UNUSED,
|
off_t offset G_GNUC_UNUSED,
|
||||||
struct fuse_file_info *fi ATTRIBUTE_UNUSED)
|
struct fuse_file_info *fi G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
int res = -ENOENT;
|
int res = -ENOENT;
|
||||||
char *hostpath = NULL;
|
char *hostpath = NULL;
|
||||||
@ -376,18 +376,18 @@ void lxcFreeFuse(virLXCFusePtr *f)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int lxcSetupFuse(virLXCFusePtr *f ATTRIBUTE_UNUSED,
|
int lxcSetupFuse(virLXCFusePtr *f G_GNUC_UNUSED,
|
||||||
virDomainDefPtr def ATTRIBUTE_UNUSED)
|
virDomainDefPtr def G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lxcStartFuse(virLXCFusePtr f ATTRIBUTE_UNUSED)
|
int lxcStartFuse(virLXCFusePtr f G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void lxcFreeFuse(virLXCFusePtr *f ATTRIBUTE_UNUSED)
|
void lxcFreeFuse(virLXCFusePtr *f G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -81,8 +81,8 @@ static virNetClientProgramEvent virLXCMonitorEvents[] = {
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virLXCMonitorHandleEventExit(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
|
virLXCMonitorHandleEventExit(virNetClientProgramPtr prog G_GNUC_UNUSED,
|
||||||
virNetClientPtr client ATTRIBUTE_UNUSED,
|
virNetClientPtr client G_GNUC_UNUSED,
|
||||||
void *evdata, void *opaque)
|
void *evdata, void *opaque)
|
||||||
{
|
{
|
||||||
virLXCMonitorPtr mon = opaque;
|
virLXCMonitorPtr mon = opaque;
|
||||||
@ -95,8 +95,8 @@ virLXCMonitorHandleEventExit(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virLXCMonitorHandleEventInit(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
|
virLXCMonitorHandleEventInit(virNetClientProgramPtr prog G_GNUC_UNUSED,
|
||||||
virNetClientPtr client ATTRIBUTE_UNUSED,
|
virNetClientPtr client G_GNUC_UNUSED,
|
||||||
void *evdata, void *opaque)
|
void *evdata, void *opaque)
|
||||||
{
|
{
|
||||||
virLXCMonitorPtr mon = opaque;
|
virLXCMonitorPtr mon = opaque;
|
||||||
@ -108,8 +108,8 @@ virLXCMonitorHandleEventInit(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void virLXCMonitorEOFNotify(virNetClientPtr client ATTRIBUTE_UNUSED,
|
static void virLXCMonitorEOFNotify(virNetClientPtr client G_GNUC_UNUSED,
|
||||||
int reason ATTRIBUTE_UNUSED,
|
int reason G_GNUC_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virLXCMonitorPtr mon = opaque;
|
virLXCMonitorPtr mon = opaque;
|
||||||
|
@ -720,7 +720,7 @@ static void virLXCProcessMonitorEOFNotify(virLXCMonitorPtr mon,
|
|||||||
virObjectEventStateQueue(driver->domainEventState, event);
|
virObjectEventStateQueue(driver->domainEventState, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED,
|
static void virLXCProcessMonitorExitNotify(virLXCMonitorPtr mon G_GNUC_UNUSED,
|
||||||
virLXCMonitorExitStatus status,
|
virLXCMonitorExitStatus status,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
@ -779,7 +779,7 @@ virLXCProcessGetNsInode(pid_t pid,
|
|||||||
|
|
||||||
/* XXX a little evil */
|
/* XXX a little evil */
|
||||||
extern virLXCDriverPtr lxc_driver;
|
extern virLXCDriverPtr lxc_driver;
|
||||||
static void virLXCProcessMonitorInitNotify(virLXCMonitorPtr mon ATTRIBUTE_UNUSED,
|
static void virLXCProcessMonitorInitNotify(virLXCMonitorPtr mon G_GNUC_UNUSED,
|
||||||
pid_t initpid,
|
pid_t initpid,
|
||||||
virDomainObjPtr vm)
|
virDomainObjPtr vm)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user