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

Use G_GNUC_WARN_UNUSED_RESULT instead of ATTRIBUTE_RETURN_CHECK

Introduced in GLib 2.10.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 426f3961
......@@ -135,7 +135,7 @@ get_nonnull_server(virNetDaemonPtr dmn, admin_nonnull_server srv)
return virNetDaemonGetServer(dmn, srv.name);
}
static int ATTRIBUTE_RETURN_CHECK
static int G_GNUC_WARN_UNUSED_RESULT
make_nonnull_server(admin_nonnull_server *srv_dst,
virNetServerPtr srv_src)
{
......
......@@ -186,7 +186,7 @@ void virDomainDeviceInfoFree(virDomainDeviceInfoPtr info);
bool virDomainDeviceInfoAddressIsEqual(const virDomainDeviceInfo *a,
const virDomainDeviceInfo *b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
bool virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info,
int type);
......
......@@ -17521,7 +17521,7 @@ virDomainChrFind(virDomainDefPtr def,
/* Return the address within vmdef to be modified when working with a
* chrdefptr of the given type. */
static int ATTRIBUTE_RETURN_CHECK
static int G_GNUC_WARN_UNUSED_RESULT
virDomainChrGetDomainPtrsInternal(virDomainDefPtr vmdef,
virDomainChrDeviceType type,
virDomainChrDefPtr ***arrPtr,
......
......@@ -2814,7 +2814,7 @@ int virDomainDefSetVcpus(virDomainDefPtr def, unsigned int vcpus);
unsigned int virDomainDefGetVcpus(const virDomainDef *def);
virBitmapPtr virDomainDefGetOnlineVcpumap(const virDomainDef *def);
virDomainVcpuDefPtr virDomainDefGetVcpu(virDomainDefPtr def, unsigned int vcpu)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virDomainDefVcpuOrderClear(virDomainDefPtr def);
int virDomainDefGetVcpusTopology(const virDomainDef *def,
unsigned int *maxvcpus);
......@@ -2844,11 +2844,11 @@ int virDomainDiskGetType(virDomainDiskDefPtr def);
void virDomainDiskSetType(virDomainDiskDefPtr def, int type);
const char *virDomainDiskGetSource(virDomainDiskDef const *def);
int virDomainDiskSetSource(virDomainDiskDefPtr def, const char *src)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virDomainDiskEmptySource(virDomainDiskDefPtr def);
const char *virDomainDiskGetDriver(const virDomainDiskDef *def);
int virDomainDiskSetDriver(virDomainDiskDefPtr def, const char *name)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virDomainDiskGetFormat(virDomainDiskDefPtr def);
void virDomainDiskSetFormat(virDomainDiskDefPtr def, int format);
virDomainControllerDefPtr
......@@ -2910,7 +2910,7 @@ int virDomainDeviceInfoIterate(virDomainDefPtr def,
bool virDomainDefHasDeviceAddress(virDomainDefPtr def,
virDomainDeviceInfoPtr info)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
void virDomainDefFree(virDomainDefPtr vm);
VIR_DEFINE_AUTOPTR_FUNC(virDomainDef, virDomainDefFree);
......@@ -3160,7 +3160,7 @@ virDomainDiskDefPtr virDomainDiskByName(virDomainDefPtr def,
const char *virDomainDiskPathByName(virDomainDefPtr, const char *name);
int virDomainDiskInsert(virDomainDefPtr def,
virDomainDiskDefPtr disk)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virDomainDiskInsertPreAlloced(virDomainDefPtr def,
virDomainDiskDefPtr disk);
int virDomainStorageNetworkParseHost(xmlNodePtr hostnode,
......@@ -3221,7 +3221,7 @@ int virDomainNetAppendIPAddress(virDomainNetDefPtr def,
int virDomainControllerInsert(virDomainDefPtr def,
virDomainControllerDefPtr controller)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virDomainControllerInsertPreAlloced(virDomainDefPtr def,
virDomainControllerDefPtr controller);
int virDomainControllerFind(const virDomainDef *def, int type, int idx);
......@@ -3239,7 +3239,7 @@ int virDomainLeaseIndex(virDomainDefPtr def,
int virDomainLeaseInsert(virDomainDefPtr def,
virDomainLeaseDefPtr lease);
int virDomainLeaseInsertPreAlloc(virDomainDefPtr def)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virDomainLeaseInsertPreAlloced(virDomainDefPtr def,
virDomainLeaseDefPtr lease);
virDomainLeaseDefPtr
......@@ -3287,7 +3287,7 @@ int virDomainSaveConfig(const char *configDir,
int virDomainSaveStatus(virDomainXMLOptionPtr xmlopt,
const char *statusDir,
virDomainObjPtr obj,
virCapsPtr caps) ATTRIBUTE_RETURN_CHECK;
virCapsPtr caps) G_GNUC_WARN_UNUSED_RESULT;
typedef void (*virDomainLoadConfigNotify)(virDomainObjPtr dom,
int newDomain,
......@@ -3357,29 +3357,29 @@ typedef const char* (*virEventActionToStringFunc)(int type);
typedef int (*virEventActionFromStringFunc)(const char *type);
int virDomainMemoryInsert(virDomainDefPtr def, virDomainMemoryDefPtr mem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
virDomainMemoryDefPtr virDomainMemoryRemove(virDomainDefPtr def, int idx)
ATTRIBUTE_NONNULL(1);
int virDomainMemoryFindByDef(virDomainDefPtr def, virDomainMemoryDefPtr mem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDomainMemoryFindInactiveByDef(virDomainDefPtr def,
virDomainMemoryDefPtr mem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDomainShmemDefInsert(virDomainDefPtr def, virDomainShmemDefPtr shmem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
bool virDomainShmemDefEquals(virDomainShmemDefPtr src, virDomainShmemDefPtr dst)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
ssize_t virDomainShmemDefFind(virDomainDefPtr def, virDomainShmemDefPtr shmem)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
virDomainShmemDefPtr virDomainShmemDefRemove(virDomainDefPtr def, size_t idx)
ATTRIBUTE_NONNULL(1);
ssize_t virDomainInputDefFind(const virDomainDef *def,
const virDomainInputDef *input)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
bool virDomainVsockDefEquals(const virDomainVsockDef *a,
const virDomainVsockDef *b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
VIR_ENUM_DECL(virDomainTaint);
VIR_ENUM_DECL(virDomainVirt);
......@@ -3558,7 +3558,7 @@ virStorageSourcePtr
virDomainStorageSourceParseBase(const char *type,
const char *format,
const char *index)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virDomainStorageSourceParse(xmlNodePtr node,
xmlXPathContextPtr ctxt,
......@@ -3572,7 +3572,7 @@ virDomainDiskBackingStoreParse(xmlXPathContextPtr ctxt,
virStorageSourcePtr src,
unsigned int flags,
virDomainXMLOptionPtr xmlopt)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
int maplen,
......@@ -3580,7 +3580,7 @@ int virDomainDefGetVcpuPinInfoHelper(virDomainDefPtr def,
unsigned char *cpumaps,
int hostcpus,
virBitmapPtr autoCpuset)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
bool virDomainDefHasMemballoon(const virDomainDef *def) ATTRIBUTE_NONNULL(1);
......
......@@ -28,7 +28,7 @@ int virNetDevBandwidthParse(virNetDevBandwidthPtr *bandwidth,
unsigned int *class_id,
xmlNodePtr node,
bool allowFloor)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBandwidthFormat(virNetDevBandwidthPtr def,
unsigned int class_id,
virBufferPtr buf);
......
......@@ -202,7 +202,7 @@ virNetworkObjPortForEach(virNetworkObjPtr obj,
int
virNetworkObjSaveStatus(const char *statusDir,
virNetworkObjPtr net,
virNetworkXMLOptionPtr xmlopt) ATTRIBUTE_RETURN_CHECK;
virNetworkXMLOptionPtr xmlopt) G_GNUC_WARN_UNUSED_RESULT;
int
virNetworkObjLoadAllConfigs(virNetworkObjListPtr nets,
......
......@@ -98,15 +98,15 @@ struct _virConnectDriver {
};
int virRegisterConnectDriver(virConnectDriverPtr driver,
bool setSharedDrivers) ATTRIBUTE_RETURN_CHECK;
int virRegisterStateDriver(virStateDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
int virSetSharedInterfaceDriver(virInterfaceDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
int virSetSharedNetworkDriver(virNetworkDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
int virSetSharedNodeDeviceDriver(virNodeDeviceDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
int virSetSharedNWFilterDriver(virNWFilterDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
int virSetSharedSecretDriver(virSecretDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
int virSetSharedStorageDriver(virStorageDriverPtr driver) ATTRIBUTE_RETURN_CHECK;
bool setSharedDrivers) G_GNUC_WARN_UNUSED_RESULT;
int virRegisterStateDriver(virStateDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
int virSetSharedInterfaceDriver(virInterfaceDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
int virSetSharedNetworkDriver(virNetworkDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
int virSetSharedNodeDeviceDriver(virNodeDeviceDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
int virSetSharedNWFilterDriver(virNWFilterDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
int virSetSharedSecretDriver(virSecretDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
int virSetSharedStorageDriver(virStorageDriverPtr driver) G_GNUC_WARN_UNUSED_RESULT;
bool virHasDriverForURIScheme(const char *scheme);
......
......@@ -588,7 +588,7 @@ udevBridgeScanDirFilter(const struct dirent *entry)
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
udevGetIfaceDefBond(struct udev *udev,
struct udev_device *dev,
const char *name,
......@@ -813,7 +813,7 @@ udevGetIfaceDefBond(struct udev *udev,
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
udevGetIfaceDefBridge(struct udev *udev,
struct udev_device *dev,
const char *name,
......@@ -919,7 +919,7 @@ udevGetIfaceDefBridge(struct udev *udev,
static int
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT
udevGetIfaceDefVlan(struct udev *udev ATTRIBUTE_UNUSED,
struct udev_device *dev ATTRIBUTE_UNUSED,
const char *name,
......
......@@ -86,7 +86,7 @@ int
libxlDomainObjBeginJob(libxlDriverPrivatePtr driver,
virDomainObjPtr obj,
enum libxlDomainJob job)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void
libxlDomainObjEndJob(libxlDriverPrivatePtr driver,
......@@ -94,7 +94,7 @@ libxlDomainObjEndJob(libxlDriverPrivatePtr driver,
int
libxlDomainJobUpdateTime(struct libxlDomainJobObj *job)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
char *
libxlDomainManagedSavePath(libxlDriverPrivatePtr driver,
......
......@@ -99,7 +99,7 @@ int
virLXCDomainObjBeginJob(virLXCDriverPtr driver,
virDomainObjPtr obj,
enum virLXCDomainJob job)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void
virLXCDomainObjEndJob(virLXCDriverPtr driver,
......
......@@ -42,7 +42,7 @@ int virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver,
bool virNWFilterHasLearnReq(int ifindex);
int virNWFilterTerminateLearnReq(const char *ifname);
int virNWFilterLockIface(const char *ifname) ATTRIBUTE_RETURN_CHECK;
int virNWFilterLockIface(const char *ifname) G_GNUC_WARN_UNUSED_RESULT;
void virNWFilterUnlockIface(const char *ifname);
int virNWFilterLearnInit(void);
......
......@@ -178,12 +178,12 @@ int
qemuBlockStorageSourceCreateGetFormatProps(virStorageSourcePtr src,
virStorageSourcePtr backing,
virJSONValuePtr *props)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
int
qemuBlockStorageSourceCreateGetStorageProps(virStorageSourcePtr src,
virJSONValuePtr *props)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int
qemuBlockStorageSourceCreate(virDomainObjPtr vm,
......
......@@ -212,7 +212,7 @@ void qemuBlockJobSyncEnd(virDomainObjPtr vm,
qemuBlockJobDataPtr
qemuBlockJobGetByDisk(virDomainDiskDefPtr disk)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
qemuBlockjobState
qemuBlockjobConvertMonitorStatus(int monitorstatus);
......@@ -40,10 +40,10 @@ int qemuTeardownInputCgroup(virDomainObjPtr vm,
virDomainInputDefPtr dev);
int qemuSetupHostdevCgroup(virDomainObjPtr vm,
virDomainHostdevDefPtr dev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuTeardownHostdevCgroup(virDomainObjPtr vm,
virDomainHostdevDefPtr dev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuSetupMemoryDevicesCgroup(virDomainObjPtr vm,
virDomainMemoryDefPtr mem);
int qemuTeardownMemoryDevicesCgroup(virDomainObjPtr vm,
......
......@@ -610,30 +610,30 @@ void qemuDomainEventEmitJobCompleted(virQEMUDriverPtr driver,
int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainJob job)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainObjBeginAgentJob(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainAgentJob agentJob)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainObjBeginJobWithAgent(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainJob job,
qemuDomainAgentJob agentJob)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainObjBeginAsyncJob(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainAsyncJob asyncJob,
virDomainJobOperation operation,
unsigned long apiFlags)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainObjBeginNestedJob(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainAsyncJob asyncJob)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainObjBeginJobNowait(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainJob job)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void qemuDomainObjEndJob(virQEMUDriverPtr driver,
virDomainObjPtr obj);
......@@ -662,11 +662,11 @@ void qemuDomainObjEnterMonitor(virQEMUDriverPtr driver,
int qemuDomainObjExitMonitor(virQEMUDriverPtr driver,
virDomainObjPtr obj)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainObjEnterMonitorAsync(virQEMUDriverPtr driver,
virDomainObjPtr obj,
qemuDomainAsyncJob asyncJob)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
qemuAgentPtr qemuDomainObjEnterAgent(virDomainObjPtr obj)
......@@ -679,7 +679,7 @@ void qemuDomainObjEnterRemote(virDomainObjPtr obj)
ATTRIBUTE_NONNULL(1);
int qemuDomainObjExitRemote(virDomainObjPtr obj,
bool checkActive)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
virDomainDefPtr qemuDomainDefCopy(virQEMUDriverPtr driver,
virQEMUCapsPtr qemuCaps,
......@@ -843,7 +843,7 @@ int qemuDomainDiskGetBackendAlias(virDomainDiskDefPtr disk,
virQEMUCapsPtr qemuCaps,
char **backendAlias)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
int qemuDomainStorageSourceChainAccessAllow(virQEMUDriverPtr driver,
virDomainObjPtr vm,
......@@ -1172,7 +1172,7 @@ qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
virStorageSourcePtr src,
virQEMUDriverConfigPtr cfg,
virQEMUCapsPtr qemuCaps)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
......@@ -1220,4 +1220,4 @@ qemuDomainValidateActualNetDef(const virDomainNetDef *net,
int
qemuDomainSupportsCheckpointsBlockjobs(virDomainObjPtr vm)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
......@@ -28,17 +28,17 @@ int qemuExtDeviceLogCommand(virQEMUDriverPtr driver,
virCommandPtr cmd,
const char *info)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuExtDevicesPrepareDomain(virQEMUDriverPtr driver,
virDomainObjPtr vm)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuExtDevicesPrepareHost(virQEMUDriverPtr driver,
virDomainObjPtr vm)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void qemuExtDevicesCleanupHost(virQEMUDriverPtr driver,
virDomainDefPtr def)
......@@ -48,7 +48,7 @@ int qemuExtDevicesStart(virQEMUDriverPtr driver,
virDomainObjPtr vm,
bool incomingMigration)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void qemuExtDevicesStop(virQEMUDriverPtr driver,
virDomainObjPtr vm)
......
......@@ -86,7 +86,7 @@ qemuMigrationJobStart(virQEMUDriverPtr driver,
virDomainObjPtr vm,
qemuDomainAsyncJob job,
unsigned long apiFlags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
static void
qemuMigrationJobSetPhase(virQEMUDriverPtr driver,
......
......@@ -206,7 +206,7 @@ qemuMigrationSrcToFile(virQEMUDriverPtr driver,
int fd,
const char *compressor,
qemuDomainAsyncJob asyncJob)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int
qemuMigrationSrcCancel(virQEMUDriverPtr driver,
......
......@@ -25,12 +25,12 @@
int qemuExtTPMInitPaths(virQEMUDriverPtr driver,
virDomainDefPtr def)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuExtTPMPrepareHost(virQEMUDriverPtr driver,
virDomainDefPtr def)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void qemuExtTPMCleanupHost(virDomainDefPtr def)
ATTRIBUTE_NONNULL(1);
......@@ -39,7 +39,7 @@ int qemuExtTPMStart(virQEMUDriverPtr driver,
virDomainObjPtr vm,
bool incomingMigration)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void qemuExtTPMStop(virQEMUDriverPtr driver,
virDomainObjPtr vm)
......@@ -49,4 +49,4 @@ int qemuExtTPMSetupCgroup(virQEMUDriverPtr driver,
virDomainDefPtr def,
virCgroupPtr cgroup)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
......@@ -27,13 +27,13 @@
int qemuExtVhostUserGPUPrepareDomain(virQEMUDriverPtr driver,
virDomainVideoDefPtr video)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int qemuExtVhostUserGPUStart(virQEMUDriverPtr driver,
virDomainObjPtr vm,
virDomainVideoDefPtr video)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void qemuExtVhostUserGPUStop(virQEMUDriverPtr driver,
virDomainObjPtr def,
......@@ -46,4 +46,4 @@ qemuExtVhostUserGPUSetupCgroup(virQEMUDriverPtr driver,
virDomainVideoDefPtr video,
virCgroupPtr cgroup)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
......@@ -95,18 +95,18 @@ static virNWFilterBindingPtr get_nonnull_nwfilter_binding(virConnectPtr conn, re
static virDomainCheckpointPtr get_nonnull_domain_checkpoint(virDomainPtr dom, remote_nonnull_domain_checkpoint checkpoint);
static virDomainSnapshotPtr get_nonnull_domain_snapshot(virDomainPtr dom, remote_nonnull_domain_snapshot snapshot);
static virNodeDevicePtr get_nonnull_node_device(virConnectPtr conn, remote_nonnull_node_device dev);
static int make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_network_port(remote_nonnull_network_port *port_dst, virNetworkPortPtr port_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_interface(remote_nonnull_interface *interface_dst, virInterfacePtr interface_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_nwfilter(remote_nonnull_nwfilter *net_dst, virNWFilterPtr nwfilter_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_nwfilter_binding(remote_nonnull_nwfilter_binding *binding_dst, virNWFilterBindingPtr binding_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_domain_checkpoint(remote_nonnull_domain_checkpoint *checkpoint_dst, virDomainCheckpointPtr checkpoint_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src) ATTRIBUTE_RETURN_CHECK;
static int make_nonnull_domain(remote_nonnull_domain *dom_dst, virDomainPtr dom_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_network(remote_nonnull_network *net_dst, virNetworkPtr net_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_network_port(remote_nonnull_network_port *port_dst, virNetworkPortPtr port_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_interface(remote_nonnull_interface *interface_dst, virInterfacePtr interface_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_storage_pool(remote_nonnull_storage_pool *pool_dst, virStoragePoolPtr pool_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virStorageVolPtr vol_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_node_device(remote_nonnull_node_device *dev_dst, virNodeDevicePtr dev_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_nwfilter(remote_nonnull_nwfilter *net_dst, virNWFilterPtr nwfilter_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_nwfilter_binding(remote_nonnull_nwfilter_binding *binding_dst, virNWFilterBindingPtr binding_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_domain_checkpoint(remote_nonnull_domain_checkpoint *checkpoint_dst, virDomainCheckpointPtr checkpoint_src) G_GNUC_WARN_UNUSED_RESULT;
static int make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src) G_GNUC_WARN_UNUSED_RESULT;
static int
remoteSerializeDomainDiskErrors(virDomainDiskErrorPtr errors,
......
......@@ -66,20 +66,20 @@ void virNetMessageQueuePush(virNetMessagePtr *queue,
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int virNetMessageEncodeHeader(virNetMessagePtr msg)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetMessageDecodeLength(virNetMessagePtr msg)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetMessageDecodeHeader(virNetMessagePtr msg)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetMessageEncodePayload(virNetMessagePtr msg,
xdrproc_t filter,
void *data)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetMessageDecodePayload(virNetMessagePtr msg,
xdrproc_t filter,
void *data)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetMessageEncodeNumFDs(virNetMessagePtr msg);
int virNetMessageDecodeNumFDs(virNetMessagePtr msg);
......@@ -87,9 +87,9 @@ int virNetMessageDecodeNumFDs(virNetMessagePtr msg);
int virNetMessageEncodePayloadRaw(virNetMessagePtr msg,
const char *buf,
size_t len)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetMessageEncodePayloadEmpty(virNetMessagePtr msg)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
void virNetMessageSaveError(virNetMessageErrorPtr rerr)
ATTRIBUTE_NONNULL(1);
......
......@@ -30,4 +30,4 @@ int virSecretGetSecretString(virConnectPtr conn,
uint8_t **ret_secret,
size_t *ret_secret_size)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
......@@ -36,7 +36,7 @@ storagePoolLookupByTargetPath(virConnectPtr conn,
char *virStoragePoolObjBuildTempFilePath(virStoragePoolObjPtr obj,
virStorageVolDefPtr voldef)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int storageRegister(void);
int storageRegisterAll(void);
......@@ -147,7 +147,7 @@ enum {
int virStorageBackendVolOpen(const char *path, struct stat *sb,
unsigned int flags)
ATTRIBUTE_RETURN_CHECK
G_GNUC_WARN_UNUSED_RESULT
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
#define VIR_STORAGE_DEFAULT_POOL_PERM_MODE 0711
......
......@@ -54,26 +54,26 @@
/* Don't call these directly - use the macros below */
int virAlloc(void *ptrptr, size_t size)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
int virAllocN(void *ptrptr, size_t size, size_t count)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
int virReallocN(void *ptrptr, size_t size, size_t count)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
int virExpandN(void *ptrptr, size_t size, size_t *count, size_t add)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
int virResizeN(void *ptrptr, size_t size, size_t *alloc, size_t count, size_t desired)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
void virShrinkN(void *ptrptr, size_t size, size_t *count, size_t toremove)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
int virInsertElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
size_t add, void *newelem,
bool clearOriginal, bool inPlace)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
int virDeleteElementsN(void *ptrptr, size_t size, size_t at, size_t *countptr,
size_t toremove, bool inPlace)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4);
int virAllocVar(void *ptrptr, size_t struct_size, size_t element_size, size_t count)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
void virFree(void *ptrptr) ATTRIBUTE_NONNULL(1);
void virDispose(void *ptrptr, size_t count, size_t element_size, size_t *countptr)
......
......@@ -33,9 +33,9 @@ typedef virBitmap *virBitmapPtr;
/*
* Allocate a bitmap capable of containing @size bits.
*/
virBitmapPtr virBitmapNewQuiet(size_t size) ATTRIBUTE_RETURN_CHECK;
virBitmapPtr virBitmapNew(size_t size) ATTRIBUTE_RETURN_CHECK;
virBitmapPtr virBitmapNewEmpty(void) ATTRIBUTE_RETURN_CHECK;
virBitmapPtr virBitmapNewQuiet(size_t size) G_GNUC_WARN_UNUSED_RESULT;
virBitmapPtr virBitmapNew(size_t size) G_GNUC_WARN_UNUSED_RESULT;
virBitmapPtr virBitmapNewEmpty(void) G_GNUC_WARN_UNUSED_RESULT;
/*
* Free previously allocated bitmap
......@@ -52,38 +52,38 @@ int virBitmapCopy(virBitmapPtr dst, virBitmapPtr src);
* Set bit position @b in @bitmap
*/
int virBitmapSetBit(virBitmapPtr bitmap, size_t b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virBitmapSetBitExpand(virBitmapPtr bitmap, size_t b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
/*
* Clear bit position @b in @bitmap
*/
int virBitmapClearBit(virBitmapPtr bitmap, size_t b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virBitmapClearBitExpand(virBitmapPtr bitmap, size_t b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
/*
* Get bit @b in @bitmap. Returns false if b is out of range.
*/
bool virBitmapIsBitSet(virBitmapPtr bitmap, size_t b)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
/*
* Get setting of bit position @b in @bitmap and store in @result
*/
int virBitmapGetBit(virBitmapPtr bitmap, size_t b, bool *result)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
virBitmapPtr
virBitmapNewString(const char *string)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
char *virBitmapToString(virBitmapPtr bitmap, bool prefix, bool trim)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
char *virBitmapFormat(virBitmapPtr bitmap);
......
......@@ -33,9 +33,9 @@ typedef virCommand *virCommandPtr;
* call any function that is not async-signal-safe. */
typedef int (*virExecHook)(void *data);
pid_t virFork(void) ATTRIBUTE_RETURN_CHECK;
pid_t virFork(void) G_GNUC_WARN_UNUSED_RESULT;
int virRun(const char *const*argv, int *status) ATTRIBUTE_RETURN_CHECK;
int virRun(const char *const*argv, int *status) G_GNUC_WARN_UNUSED_RESULT;
virCommandPtr virCommandNew(const char *binary) ATTRIBUTE_NONNULL(1);
......@@ -172,26 +172,26 @@ void virCommandSetPreExecHook(virCommandPtr cmd,
void virCommandWriteArgLog(virCommandPtr cmd,
int logfd);
char *virCommandToString(virCommandPtr cmd, bool linebreaks) ATTRIBUTE_RETURN_CHECK;
char *virCommandToString(virCommandPtr cmd, bool linebreaks) G_GNUC_WARN_UNUSED_RESULT;
int virCommandExec(virCommandPtr cmd, gid_t *groups, int ngroups) ATTRIBUTE_RETURN_CHECK;
int virCommandExec(virCommandPtr cmd, gid_t *groups, int ngroups) G_GNUC_WARN_UNUSED_RESULT;
int virCommandRun(virCommandPtr cmd,
int *exitstatus) ATTRIBUTE_RETURN_CHECK;
int *exitstatus) G_GNUC_WARN_UNUSED_RESULT;
int virCommandRunAsync(virCommandPtr cmd,
pid_t *pid) ATTRIBUTE_RETURN_CHECK;
pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;
int virCommandWait(virCommandPtr cmd,
int *exitstatus) ATTRIBUTE_RETURN_CHECK;
int *exitstatus) G_GNUC_WARN_UNUSED_RESULT;
void virCommandRequireHandshake(virCommandPtr cmd);
int virCommandHandshakeWait(virCommandPtr cmd)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virCommandHandshakeNotify(virCommandPtr cmd)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virCommandAbort(virCommandPtr cmd);
......
......@@ -45,14 +45,14 @@ virCryptoHashBuf(virCryptoHash hash,
const char *input,
unsigned char *output)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
virCryptoHashString(virCryptoHash hash,
const char *input,
char **output)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
bool virCryptoHaveCipher(virCryptoCipher algorithm);
......@@ -62,4 +62,4 @@ int virCryptoEncryptData(virCryptoCipher algorithm,
uint8_t *data, size_t datalen,
uint8_t **ciphertext, size_t *ciphertextlen)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(6)
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(9) G_GNUC_WARN_UNUSED_RESULT;
......@@ -37,19 +37,19 @@ typedef enum {
VIR_FILE_CLOSE_DONT_LOG = 1 << 2,
} virFileCloseFlags;
ssize_t saferead(int fd, void *buf, size_t count) ATTRIBUTE_RETURN_CHECK;
ssize_t saferead(int fd, void *buf, size_t count) G_GNUC_WARN_UNUSED_RESULT;
ssize_t safewrite(int fd, const void *buf, size_t count)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int safezero(int fd, off_t offset, off_t len)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virFileAllocate(int fd, off_t offset, off_t len)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
/* Don't call these directly - use the macros below */
int virFileClose(int *fdptr, virFileCloseFlags flags)
ATTRIBUTE_RETURN_CHECK;
int virFileFclose(FILE **file, bool preserve_errno) ATTRIBUTE_RETURN_CHECK;
FILE *virFileFdopen(int *fdptr, const char *mode) ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virFileFclose(FILE **file, bool preserve_errno) G_GNUC_WARN_UNUSED_RESULT;
FILE *virFileFdopen(int *fdptr, const char *mode) G_GNUC_WARN_UNUSED_RESULT;
static inline void virForceCloseHelper(int *fd)
{
......@@ -107,7 +107,7 @@ typedef enum {
virFileWrapperFdPtr virFileWrapperFdNew(int *fd,
const char *name,
unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virFileWrapperFdClose(virFileWrapperFdPtr dfd);
......@@ -146,20 +146,20 @@ int virFileNBDDeviceAssociate(const char *file,
int virFileDeleteTree(const char *dir);
int virFileReadHeaderFD(int fd, int maxlen, char **buf)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(3);
int virFileReadHeaderQuiet(const char *path, int maxlen, char **buf)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
int virFileReadLimFD(int fd, int maxlen, char **buf)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(3);
int virFileReadAll(const char *path, int maxlen, char **buf)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
int virFileReadAllQuiet(const char *path, int maxlen, char **buf)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
int virFileReadBufQuiet(const char *file, char *buf, int len)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int virFileWriteStr(const char *path, const char *str, mode_t mode)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virFileLinkPointsTo(const char *checkLink,
const char *checkDest)
......@@ -170,15 +170,15 @@ int virFileRelLinkPointsTo(const char *directory,
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
int virFileResolveLink(const char *linkpath,
char **resultpath) ATTRIBUTE_RETURN_CHECK;
char **resultpath) G_GNUC_WARN_UNUSED_RESULT;
int virFileResolveAllLinks(const char *linkpath,
char **resultpath) ATTRIBUTE_RETURN_CHECK;
char **resultpath) G_GNUC_WARN_UNUSED_RESULT;
int virFileIsLink(const char *linkpath)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virFileReadLink(const char *linkpath, char **resultpath)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
char *virFindFileInPath(const char *file);
......@@ -219,16 +219,16 @@ int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
int virFileIsSharedFS(const char *path) ATTRIBUTE_NONNULL(1);
int virFileIsMountPoint(const char *file) ATTRIBUTE_NONNULL(1);
int virFileIsCDROM(const char *path)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virFileGetMountSubtree(const char *mtabpath,
const char *prefix,
char ***mountsret,
size_t *nmountsret) ATTRIBUTE_RETURN_CHECK;
size_t *nmountsret) G_GNUC_WARN_UNUSED_RESULT;
int virFileGetMountReverseSubtree(const char *mtabpath,
const char *prefix,
char ***mountsret,
size_t *nmountsret) ATTRIBUTE_RETURN_CHECK;
size_t *nmountsret) G_GNUC_WARN_UNUSED_RESULT;
char *virFileSanitizePath(const char *path);
char *virFileCanonicalizePath(const char *path) ATTRIBUTE_NOINLINE;
......@@ -242,15 +242,15 @@ enum {
};
int virFileAccessibleAs(const char *path, int mode,
uid_t uid, gid_t gid)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virFileOpenAs(const char *path, int openflags, mode_t mode,
uid_t uid, gid_t gid,
unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virFileRemove(const char *path, uid_t uid, gid_t gid);
int virFileChownFiles(const char *name, uid_t uid, gid_t gid)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
enum {
VIR_DIR_CREATE_NONE = 0,
......@@ -258,27 +258,27 @@ enum {
VIR_DIR_CREATE_ALLOW_EXIST = (1 << 1),
};
int virDirCreate(const char *path, mode_t mode, uid_t uid, gid_t gid,
unsigned int flags) ATTRIBUTE_RETURN_CHECK;
unsigned int flags) G_GNUC_WARN_UNUSED_RESULT;
int virDirOpen(DIR **dirp, const char *dirname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDirOpenIfExists(DIR **dirp, const char *dirname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDirOpenQuiet(DIR **dirp, const char *dirname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virDirRead(DIR *dirp, struct dirent **ent, const char *dirname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
void virDirClose(DIR **dirp)
ATTRIBUTE_NONNULL(1);
#define VIR_DIR_CLOSE(dir) virDirClose(&(dir))
int virFileMakePath(const char *path) ATTRIBUTE_RETURN_CHECK;
int virFileMakePath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
int virFileMakePathWithMode(const char *path,
mode_t mode) ATTRIBUTE_RETURN_CHECK;
int virFileMakeParentPath(const char *path) ATTRIBUTE_RETURN_CHECK;
mode_t mode) G_GNUC_WARN_UNUSED_RESULT;
int virFileMakeParentPath(const char *path) G_GNUC_WARN_UNUSED_RESULT;
char *virFileBuildPath(const char *dir,
const char *name,
const char *ext) ATTRIBUTE_RETURN_CHECK;
const char *ext) G_GNUC_WARN_UNUSED_RESULT;
#ifdef WIN32
......@@ -304,7 +304,7 @@ char *virFileBuildPath(const char *dir,
bool virFileIsAbsPath(const char *path);
int virFileAbsPath(const char *path,
char **abspath) ATTRIBUTE_RETURN_CHECK;
char **abspath) G_GNUC_WARN_UNUSED_RESULT;
const char *virFileSkipRoot(const char *path);
void virFileRemoveLastComponent(char *path);
......
......@@ -59,38 +59,38 @@ int iptablesAddForwardAllowOut (virFirewallPtr fw,
unsigned int prefix,
const char *iface,
const char *physdev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesRemoveForwardAllowOut (virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *iface,
const char *physdev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesAddForwardAllowRelatedIn(virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *iface,
const char *physdev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesRemoveForwardAllowRelatedIn(virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *iface,
const char *physdev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesAddForwardAllowIn (virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *iface,
const char *physdev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesRemoveForwardAllowIn (virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *iface,
const char *physdev)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void iptablesAddForwardAllowCross (virFirewallPtr fw,
virFirewallLayer layer,
......@@ -120,7 +120,7 @@ int iptablesAddForwardMasquerade (virFirewallPtr fw,
virSocketAddrRangePtr addr,
virPortRangePtr port,
const char *protocol)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesRemoveForwardMasquerade (virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
......@@ -128,19 +128,19 @@ int iptablesRemoveForwardMasquerade (virFirewallPtr fw,
virSocketAddrRangePtr addr,
virPortRangePtr port,
const char *protocol)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesAddDontMasquerade (virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *physdev,
const char *destaddr)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int iptablesRemoveDontMasquerade (virFirewallPtr fw,
virSocketAddr *netaddr,
unsigned int prefix,
const char *physdev,
const char *destaddr)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void iptablesAddOutputFixUdpChecksum (virFirewallPtr fw,
const char *iface,
int port);
......
......@@ -33,18 +33,18 @@ virISCSIConnectionLogin(const char *portal,
const char *initiatoriqn,
const char *target)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
virISCSIConnectionLogout(const char *portal,
const char *initiatoriqn,
const char *target)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
virISCSIRescanLUNs(const char *session)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int
virISCSIScanTargets(const char *portal,
......@@ -52,13 +52,13 @@ virISCSIScanTargets(const char *portal,
bool persist,
size_t *ntargetsret,
char ***targetsret)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int
virISCSINodeNew(const char *portal,
const char *target)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
virISCSINodeUpdate(const char *portal,
......@@ -66,4 +66,4 @@ virISCSINodeUpdate(const char *portal,
const char *name,
const char *value)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
......@@ -147,7 +147,7 @@ char *virJSONValueToString(virJSONValuePtr object,
int virJSONValueToBuffer(virJSONValuePtr object,
virBufferPtr buf,
bool pretty)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
typedef int (*virJSONValueObjectIteratorFunc)(const char *key,
virJSONValuePtr value,
......
......@@ -33,13 +33,13 @@ virKeyFilePtr virKeyFileNew(void);
int virKeyFileLoadFile(virKeyFilePtr conf,
const char *filename)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virKeyFileLoadData(virKeyFilePtr conf,
const char *filename,
const char *data,
size_t len)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
void virKeyFileFree(virKeyFilePtr conf);
......
......@@ -54,10 +54,10 @@ const char *virMacAddrFormat(const virMacAddr *addr,
void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
virMacAddrPtr addr) ATTRIBUTE_NOINLINE;
int virMacAddrParse(const char* str,
virMacAddrPtr addr) ATTRIBUTE_RETURN_CHECK;
virMacAddrPtr addr) G_GNUC_WARN_UNUSED_RESULT;
int virMacAddrParseHex(const char* str,
virMacAddrPtr addr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
bool virMacAddrIsUnicast(const virMacAddr *addr);
bool virMacAddrIsMulticast(const virMacAddr *addr);
bool virMacAddrIsBroadcastRaw(const unsigned char s[VIR_MAC_BUFLEN]);
......
......@@ -147,87 +147,87 @@ struct _virNetDevCoalesce {
int virNetDevSetupControl(const char *ifname,
virIfreq *ifr)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevExists(const char *brname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevSetOnline(const char *ifname,
bool online)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevGetOnline(const char *ifname,
bool *online)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetMAC(const char *ifname,
const virMacAddr *macaddr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevGetMAC(const char *ifname,
virMacAddrPtr macaddr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevReplaceMacAddress(const char *linkdev,
const virMacAddr *macaddress,
const char *stateDir)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevRestoreMacAddress(const char *linkdev,
const char *stateDir)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetCoalesce(const char *ifname,
virNetDevCoalescePtr coalesce,
bool update)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetMTU(const char *ifname,
int mtu)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetMTUFromDevice(const char *ifname,
const char *otherifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetMTU(const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetNamespace(const char *ifname, pid_t pidInNs)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetName(const char *ifname, const char *newifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
char *virNetDevGetName(int ifindex)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetIndex(const char *ifname, int *ifindex)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetVLanID(const char *ifname, int *vlanid)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetMaster(const char *ifname, char **master)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevValidateConfig(const char *ifname,
const virMacAddr *macaddr, int ifindex)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevIsVirtualFunction(const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetVirtualFunctionIndex(const char *pfname, const char *vfname,
int *vf_index)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetPhysicalFunction(const char *ifname, char **pfname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevPFGetVF(const char *pfname, int vf, char **vfname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetPhysPortID(const char *ifname,
char **physPortID)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetVirtualFunctions(const char *pfname,
char ***vfname,
......@@ -235,12 +235,12 @@ int virNetDevGetVirtualFunctions(const char *pfname,
size_t *n_vfname,
unsigned int *max_vfs)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSaveNetConfig(const char *linkdev, int vf,
const char *stateDir,
bool saveVlan)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT;
int
virNetDevReadNetConfig(const char *linkdev, int vf,
......@@ -249,7 +249,7 @@ virNetDevReadNetConfig(const char *linkdev, int vf,
virNetDevVlanPtr *vlan,
virMacAddrPtr *MAC)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(5) ATTRIBUTE_NONNULL(6) G_GNUC_WARN_UNUSED_RESULT;
int
virNetDevSetNetConfig(const char *linkdev, int vf,
......@@ -257,7 +257,7 @@ virNetDevSetNetConfig(const char *linkdev, int vf,
virNetDevVlanPtr vlan,
const virMacAddr *MAC,
bool setVLan)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetVirtualFunctionInfo(const char *vfname, char **pfname,
int *vf)
......@@ -265,40 +265,40 @@ int virNetDevGetVirtualFunctionInfo(const char *vfname, char **pfname,
int virNetDevGetFeatures(const char *ifname,
virBitmapPtr *out)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetLinkInfo(const char *ifname,
virNetDevIfLinkPtr lnk)
ATTRIBUTE_NONNULL(1);
virNetDevRxFilterPtr virNetDevRxFilterNew(void)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
void virNetDevRxFilterFree(virNetDevRxFilterPtr filter);
int virNetDevGetRxFilter(const char *ifname,
virNetDevRxFilterPtr *filter)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevAddMulti(const char *ifname,
virMacAddrPtr macaddr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevDelMulti(const char *ifname,
virMacAddrPtr macaddr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetPromiscuous(const char *ifname, bool promiscuous)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetPromiscuous(const char *ifname, bool *promiscuous)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetRcvMulti(const char *ifname, bool receive)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetRcvMulti(const char *ifname, bool *receive)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevSetRcvAllMulti(const char *ifname, bool receive)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevGetRcvAllMulti(const char *ifname, bool *receive)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
#define SYSFS_NET_DIR "/sys/class/net/"
#define SYSFS_INFINIBAND_DIR "/sys/class/infiniband/"
......@@ -306,7 +306,7 @@ int virNetDevSysfsFile(char **pf_sysfs_device_link,
const char *ifname,
const char *file)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevRunEthernetScript(const char *ifname, const char *script)
ATTRIBUTE_NOINLINE;
......
......@@ -42,11 +42,11 @@ int virNetDevBandwidthSet(const char *ifname,
virNetDevBandwidthPtr bandwidth,
bool hierarchical_class,
bool swapped)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBandwidthClear(const char *ifname);
int virNetDevBandwidthCopy(virNetDevBandwidthPtr *dest,
const virNetDevBandwidth *src)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
bool virNetDevBandwidthEqual(virNetDevBandwidthPtr a, virNetDevBandwidthPtr b);
......@@ -56,20 +56,20 @@ int virNetDevBandwidthPlug(const char *brname,
virNetDevBandwidthPtr bandwidth,
unsigned int id)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBandwidthUnplug(const char *brname,
unsigned int id)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBandwidthUpdateRate(const char *ifname,
unsigned int id,
virNetDevBandwidthPtr bandwidth,
unsigned long long new_rate)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBandwidthUpdateFilter(const char *ifname,
const virMacAddr *ifmac_ptr,
unsigned int id)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
......@@ -22,56 +22,56 @@
#include "virmacaddr.h"
int virNetDevBridgeCreate(const char *brname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeDelete(const char *brname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeAddPort(const char *brname,
const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeRemovePort(const char *brname,
const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeSetSTPDelay(const char *brname,
int delay)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeGetSTPDelay(const char *brname,
int *delay)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeSetSTP(const char *brname,
bool enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeGetSTP(const char *brname,
bool *enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeSetVlanFiltering(const char *brname,
bool enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeGetVlanFiltering(const char *brname,
bool *enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgePortGetLearning(const char *brname,
const char *ifname,
bool *enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgePortSetLearning(const char *brname,
const char *ifname,
bool enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgePortGetUnicastFlood(const char *brname,
const char *ifname,
bool *enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgePortSetUnicastFlood(const char *brname,
const char *ifname,
bool enable)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
typedef enum {
VIR_NETDEVBRIDGE_FDB_FLAG_ROUTER = (1 << 0),
......@@ -84,7 +84,7 @@ typedef enum {
int virNetDevBridgeFDBAdd(const virMacAddr *mac, const char *ifname,
unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevBridgeFDBDel(const virMacAddr *mac, const char *ifname,
unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
......@@ -63,20 +63,20 @@ int virNetDevIPAddrAdd(const char *ifname,
virSocketAddr *addr,
virSocketAddr *peer,
unsigned int prefix)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevIPRouteAdd(const char *ifname,
virSocketAddrPtr addr,
unsigned int prefix,
virSocketAddrPtr gateway,
unsigned int metric)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevIPAddrDel(const char *ifname,
virSocketAddr *addr,
unsigned int prefix)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevIPAddrGet(const char *ifname, virSocketAddrPtr addr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevIPWaitDadFinish(virSocketAddrPtr *addrs, size_t count)
ATTRIBUTE_NONNULL(1);
bool virNetDevIPCheckIPv6Forwarding(void);
......
......@@ -58,7 +58,7 @@ int virNetDevMacVLanReserveName(const char *name, bool quietfail);
int virNetDevMacVLanReleaseName(const char *name);
bool virNetDevMacVLanIsMacvtap(const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevMacVLanCreate(const char *ifname,
const char *type,
......@@ -67,10 +67,10 @@ int virNetDevMacVLanCreate(const char *ifname,
uint32_t macvlan_mode,
int *retry)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanDelete(const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
const virMacAddr *macaddress,
......@@ -86,16 +86,16 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
size_t tapfdSize,
unsigned int flags)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(10) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanTapOpen(const char *ifname,
int *tapfd,
size_t tapfdSize)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanTapSetup(int *tapfd, size_t tapfdSize, bool vnet_hdr)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
const virMacAddr *macaddress,
......@@ -104,7 +104,7 @@ int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
virNetDevVPortProfilePtr virtPortProfile,
char *stateDir)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(6) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(6) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname,
const virMacAddr *macaddress,
......@@ -113,7 +113,7 @@ int virNetDevMacVLanRestartWithVPortProfile(const char *cr_ifname,
virNetDevVPortProfilePtr virtPortProfile,
virNetDevVPortProfileOp vmOp)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname,
const virMacAddr *macaddress,
......@@ -122,4 +122,4 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname,
virNetDevVPortProfilePtr virtPortProfile,
virNetDevVPortProfileOp vmOp)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
......@@ -24,7 +24,7 @@
int virNetDevMidonetBindPort(const char *ifname,
virNetDevVPortProfilePtr virtualport)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevMidonetUnbindPort(virNetDevVPortProfilePtr virtualport)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
......@@ -35,35 +35,35 @@ int virNetDevOpenvswitchAddPort(const char *brname,
virNetDevVPortProfilePtr ovsport,
virNetDevVlanPtr virtVlan)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchRemovePort(const char *brname, const char *ifname)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchGetMigrateData(char **migrate, const char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchSetMigrateData(char *migrate, const char *ifname)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceParseStats(const char *json,
virDomainInterfaceStatsPtr stats)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceStats(const char *ifname,
virDomainInterfaceStatsPtr stats)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchInterfaceGetMaster(const char *ifname, char **master)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevOpenvswitchGetVhostuserIfname(const char *path,
char **ifname)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevOpenvswitchUpdateVlan(const char *ifname,
virNetDevVlanPtr virtVlan)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
......@@ -34,17 +34,17 @@ int virNetDevTapCreate(char **ifname,
int *tapfd,
size_t tapfdSize,
unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevTapDelete(const char *ifname,
const char *tunpath)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevTapGetName(int tapfd, char **ifname)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
char* virNetDevTapGetRealDeviceName(char *ifname)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
typedef enum {
VIR_NETDEV_TAP_CREATE_NONE = 0,
......@@ -68,7 +68,7 @@ virNetDevTapAttachBridge(const char *tapname,
unsigned int mtu,
unsigned int *actualMTU)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
virNetDevTapReattachBridge(const char *tapname,
......@@ -80,7 +80,7 @@ virNetDevTapReattachBridge(const char *tapname,
unsigned int mtu,
unsigned int *actualMTU)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virNetDevTapCreateInBridgePort(const char *brname,
char **ifname,
......@@ -96,9 +96,9 @@ int virNetDevTapCreateInBridgePort(const char *brname,
unsigned int *actualMTU,
unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virNetDevTapInterfaceStats(const char *ifname,
virDomainInterfaceStatsPtr stats,
bool swapped)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
......@@ -23,6 +23,6 @@
/* Function declarations */
int virNetDevVethCreate(char **veth1, char **veth2)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevVethDelete(const char *veth)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
......@@ -99,7 +99,7 @@ int virNetDevVPortProfileAssociate(const char *ifname,
const unsigned char *vmuuid,
virNetDevVPortProfileOp vmOp,
bool setlink_only)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int virNetDevVPortProfileDisassociate(const char *ifname,
const virNetDevVPortProfile *virtPort,
......@@ -107,4 +107,4 @@ int virNetDevVPortProfileDisassociate(const char *ifname,
const char *linkdev,
int vf,
virNetDevVPortProfileOp vmOp)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
......@@ -109,7 +109,7 @@ int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen);
int virNetlinkDumpLink(const char *ifname, int ifindex,
void **nlData, struct nlattr **tb,
uint32_t src_pid, uint32_t dst_pid)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int
virNetlinkGetNeighbor(void **nlData, uint32_t src_pid, uint32_t dst_pid);
......
......@@ -228,7 +228,7 @@ int virPCIGetNetName(const char *device_link_sysfs_path,
int virPCIGetSysfsFile(char *virPCIDeviceName,
char **pci_sysfs_device_link)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
bool virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr,
bool report);
......
......@@ -30,24 +30,24 @@ char *virPidFileBuildPath(const char *dir,
const char *name);
int virPidFileWritePath(const char *path,
pid_t pid) ATTRIBUTE_RETURN_CHECK;
pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileWrite(const char *dir,
const char *name,
pid_t pid) ATTRIBUTE_RETURN_CHECK;
pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileReadPath(const char *path,
pid_t *pid) ATTRIBUTE_RETURN_CHECK;
pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileRead(const char *dir,
const char *name,
pid_t *pid) ATTRIBUTE_RETURN_CHECK;
pid_t *pid) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileReadPathIfAlive(const char *path,
pid_t *pid,
const char *binpath) ATTRIBUTE_RETURN_CHECK;
const char *binpath) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileReadIfAlive(const char *dir,
const char *name,
pid_t *pid,
const char *binpath) ATTRIBUTE_RETURN_CHECK;
const char *binpath) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileDeletePath(const char *path);
int virPidFileDelete(const char *dir,
......@@ -56,11 +56,11 @@ int virPidFileDelete(const char *dir,
int virPidFileAcquirePath(const char *path,
bool waitForLock,
pid_t pid) ATTRIBUTE_RETURN_CHECK;
pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileAcquire(const char *dir,
const char *name,
bool waitForLock,
pid_t pid) ATTRIBUTE_RETURN_CHECK;
pid_t pid) G_GNUC_WARN_UNUSED_RESULT;
int virPidFileReleasePath(const char *path,
int fd);
......
......@@ -50,7 +50,7 @@ void virProcessExitWithStatus(int status) G_GNUC_NORETURN;
int
virProcessWait(pid_t pid, int *exitstatus, bool raw)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virProcessKill(pid_t pid, int sig);
......
......@@ -24,5 +24,5 @@ uint64_t virRandomBits(int nbits) ATTRIBUTE_NOINLINE;
double virRandom(void);
uint32_t virRandomInt(uint32_t max);
int virRandomBytes(unsigned char *buf, size_t buflen)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NOINLINE;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NOINLINE;
int virRandomGenerateWWN(char **wwn, const char *virt_type) ATTRIBUTE_NOINLINE;
......@@ -63,55 +63,55 @@ int virStrToLong_i(char const *s,
char **end_ptr,
int base,
int *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_ui(char const *s,
char **end_ptr,
int base,
unsigned int *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_uip(char const *s,
char **end_ptr,
int base,
unsigned int *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_l(char const *s,
char **end_ptr,
int base,
long *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_ul(char const *s,
char **end_ptr,
int base,
unsigned long *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_ulp(char const *s,
char **end_ptr,
int base,
unsigned long *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_ll(char const *s,
char **end_ptr,
int base,
long long *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_ull(char const *s,
char **end_ptr,
int base,
unsigned long long *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToLong_ullp(char const *s,
char **end_ptr,
int base,
unsigned long long *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrToDouble(char const *s,
char **end_ptr,
double *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virDoubleToStr(char **strp, double number)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
void virSkipSpaces(const char **str) ATTRIBUTE_NONNULL(1);
void virSkipSpacesAndBackslash(const char **str) ATTRIBUTE_NONNULL(1);
......@@ -122,23 +122,23 @@ void virSkipSpacesBackwards(const char *str, char **endp)
bool virStringIsEmpty(const char *str);
int virStrncpy(char *dest, const char *src, size_t n, size_t destbytes)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virStrcpy(char *dest, const char *src, size_t destbytes)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
#define virStrcpyStatic(dest, src) virStrcpy((dest), (src), sizeof(dest))
/* Don't call these directly - use the macros below */
int virStrdup(char **dest, const char *src)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
int virStrndup(char **dest, const char *src, ssize_t n)
ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1);
G_GNUC_WARN_UNUSED_RESULT ATTRIBUTE_NONNULL(1);
int virAsprintfInternal(char **strp, const char *fmt, ...)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 3)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virVasprintfInternal(char **strp, const char *fmt, va_list list)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_FMT_PRINTF(2, 0)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
/**
* VIR_STRDUP:
......@@ -276,7 +276,7 @@ bool virStringHasSuffix(const char *str,
bool virStringHasCaseSuffix(const char *str,
const char *suffix);
bool virStringStripSuffix(char *str,
const char *suffix) ATTRIBUTE_RETURN_CHECK;
const char *suffix) G_GNUC_WARN_UNUSED_RESULT;
bool virStringMatchesNameSuffix(const char *file,
const char *name,
const char *suffix);
......@@ -295,11 +295,11 @@ void virStringTrimOptionalNewline(char *str);
int virStringParsePort(const char *str,
unsigned int *port)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virStringParseYesNo(const char *str,
bool *result)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
/**
* VIR_AUTOSTRINGLIST:
*
......
......@@ -92,7 +92,7 @@ int virThreadCreateFull(virThreadPtr thread,
virThreadFunc func,
const char *funcName,
bool worker,
void *opaque) ATTRIBUTE_RETURN_CHECK;
void *opaque) G_GNUC_WARN_UNUSED_RESULT;
void virThreadSelf(virThreadPtr thread);
bool virThreadIsSelf(virThreadPtr thread);
void virThreadJoin(virThreadPtr thread);
......@@ -121,17 +121,17 @@ unsigned long long virThreadID(virThreadPtr thread);
* }
*/
int virOnce(virOnceControlPtr once, virOnceFunc init)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
int virMutexInit(virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
int virMutexInitRecursive(virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
int virMutexInit(virMutexPtr m) G_GNUC_WARN_UNUSED_RESULT;
int virMutexInitRecursive(virMutexPtr m) G_GNUC_WARN_UNUSED_RESULT;
void virMutexDestroy(virMutexPtr m);
void virMutexLock(virMutexPtr m);
void virMutexUnlock(virMutexPtr m);
int virRWLockInit(virRWLockPtr m) ATTRIBUTE_RETURN_CHECK;
int virRWLockInit(virRWLockPtr m) G_GNUC_WARN_UNUSED_RESULT;
void virRWLockDestroy(virRWLockPtr m);
void virRWLockRead(virRWLockPtr m);
......@@ -139,7 +139,7 @@ void virRWLockWrite(virRWLockPtr m);
void virRWLockUnlock(virRWLockPtr m);
int virCondInit(virCondPtr c) ATTRIBUTE_RETURN_CHECK;
int virCondInit(virCondPtr c) G_GNUC_WARN_UNUSED_RESULT;
int virCondDestroy(virCondPtr c);
/* virCondWait, virCondWaitUntil:
......@@ -147,8 +147,8 @@ int virCondDestroy(virCondPtr c);
* changing value. Therefore in nearly all cases they
* should be enclosed in a while loop that checks the predicate.
*/
int virCondWait(virCondPtr c, virMutexPtr m) ATTRIBUTE_RETURN_CHECK;
int virCondWaitUntil(virCondPtr c, virMutexPtr m, unsigned long long whenms) ATTRIBUTE_RETURN_CHECK;
int virCondWait(virCondPtr c, virMutexPtr m) G_GNUC_WARN_UNUSED_RESULT;
int virCondWaitUntil(virCondPtr c, virMutexPtr m, unsigned long long whenms) G_GNUC_WARN_UNUSED_RESULT;
void virCondSignal(virCondPtr c);
void virCondBroadcast(virCondPtr c);
......@@ -156,9 +156,9 @@ void virCondBroadcast(virCondPtr c);
typedef void (*virThreadLocalCleanup)(void *);
int virThreadLocalInit(virThreadLocalPtr l,
virThreadLocalCleanup c) ATTRIBUTE_RETURN_CHECK;
virThreadLocalCleanup c) G_GNUC_WARN_UNUSED_RESULT;
void *virThreadLocalGet(virThreadLocalPtr l);
int virThreadLocalSet(virThreadLocalPtr l, void*) ATTRIBUTE_RETURN_CHECK;
int virThreadLocalSet(virThreadLocalPtr l, void*) G_GNUC_WARN_UNUSED_RESULT;
/**
......
......@@ -50,7 +50,7 @@ void virThreadPoolFree(virThreadPoolPtr pool);
int virThreadPoolSendJob(virThreadPoolPtr pool,
unsigned int priority,
void *jobdata) ATTRIBUTE_NONNULL(1)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virThreadPoolSetParameters(virThreadPoolPtr pool,
long long int minWorkers,
......
......@@ -40,26 +40,26 @@ void virTimeFieldsThen(unsigned long long when, struct tm *fields)
/* These APIs are async signal safe and return -1, setting
* errno on failure */
int virTimeMillisNowRaw(unsigned long long *now)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virTimeFieldsNowRaw(struct tm *fields)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virTimeStringNowRaw(char *buf)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virTimeStringThenRaw(unsigned long long when, char *buf)
ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
/* These APIs are *not* async signal safe and return -1,
* raising a libvirt error on failure
*/
int virTimeMillisNow(unsigned long long *now)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virTimeFieldsNow(struct tm *fields)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
char *virTimeStringNow(void);
char *virTimeStringThen(unsigned long long when);
int virTimeLocalOffsetFromUTC(long *offset)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
typedef struct {
unsigned long long start_t;
......
......@@ -62,7 +62,7 @@ struct _virTypedParameterRemote {
int virTypedParamsValidate(virTypedParameterPtr params, int nparams,
/* const char *name, int type ... */ ...)
G_GNUC_NULL_TERMINATED ATTRIBUTE_RETURN_CHECK;
G_GNUC_NULL_TERMINATED G_GNUC_WARN_UNUSED_RESULT;
bool virTypedParamsCheck(virTypedParameterPtr params,
int nparams,
......@@ -79,12 +79,12 @@ virTypedParamsFilter(virTypedParameterPtr params,
int nparams,
const char *name,
virTypedParameterPtr **ret)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virTypedParameterAssign(virTypedParameterPtr param, const char *name,
int type, /* TYPE arg */ ...)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamsReplaceString(virTypedParameterPtr *params,
int *nparams,
......@@ -149,34 +149,34 @@ int virTypedParamListAddInt(virTypedParamListPtr list,
int value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamListAddUInt(virTypedParamListPtr list,
unsigned int value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamListAddLLong(virTypedParamListPtr list,
long long value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamListAddULLong(virTypedParamListPtr list,
unsigned long long value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamListAddString(virTypedParamListPtr list,
const char *value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamListAddBoolean(virTypedParamListPtr list,
bool value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
int virTypedParamListAddDouble(virTypedParamListPtr list,
double value,
const char *namefmt,
...)
ATTRIBUTE_FMT_PRINTF(3, 4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_FMT_PRINTF(3, 4) G_GNUC_WARN_UNUSED_RESULT;
......@@ -27,11 +27,11 @@
#include <sys/types.h>
int virSetBlocking(int fd, bool blocking) ATTRIBUTE_RETURN_CHECK;
int virSetNonBlock(int fd) ATTRIBUTE_RETURN_CHECK;
int virSetInherit(int fd, bool inherit) ATTRIBUTE_RETURN_CHECK;
int virSetCloseExec(int fd) ATTRIBUTE_RETURN_CHECK;
int virSetSockReuseAddr(int fd, bool fatal) ATTRIBUTE_RETURN_CHECK;
int virSetBlocking(int fd, bool blocking) G_GNUC_WARN_UNUSED_RESULT;
int virSetNonBlock(int fd) G_GNUC_WARN_UNUSED_RESULT;
int virSetInherit(int fd, bool inherit) G_GNUC_WARN_UNUSED_RESULT;
int virSetCloseExec(int fd) G_GNUC_WARN_UNUSED_RESULT;
int virSetSockReuseAddr(int fd, bool fatal) G_GNUC_WARN_UNUSED_RESULT;
int virSetUIDGID(uid_t uid, gid_t gid, gid_t *groups, int ngroups);
int virSetUIDGIDWithCaps(uid_t uid, gid_t gid, gid_t *groups, int ngroups,
......@@ -42,7 +42,7 @@ void virWaitForDevices(void);
int virScaleInteger(unsigned long long *value, const char *suffix,
unsigned long long scale, unsigned long long limit)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
int virHexToBin(unsigned char c);
......@@ -50,7 +50,7 @@ int virParseVersionString(const char *str, unsigned long *version,
bool allowMissing);
char *virFormatIntDecimal(char *buf, size_t buflen, int val)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) G_GNUC_WARN_UNUSED_RESULT;
unsigned long long
virFormatIntPretty(unsigned long long val,
......@@ -108,9 +108,9 @@ char *virGetGroupName(gid_t gid) ATTRIBUTE_NOINLINE;
int virGetGroupList(uid_t uid, gid_t group, gid_t **groups)
ATTRIBUTE_NONNULL(3);
int virGetUserID(const char *name,
uid_t *uid) ATTRIBUTE_RETURN_CHECK;
uid_t *uid) G_GNUC_WARN_UNUSED_RESULT;
int virGetGroupID(const char *name,
gid_t *gid) ATTRIBUTE_RETURN_CHECK;
gid_t *gid) G_GNUC_WARN_UNUSED_RESULT;
bool virDoesUserExist(const char *name);
bool virDoesGroupExist(const char *name);
......
......@@ -49,7 +49,7 @@ int virUUIDGenerate(unsigned char *uuid) ATTRIBUTE_NOINLINE;
int virUUIDParse(const char *uuidstr,
unsigned char *uuid)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
const char *virUUIDFormat(const unsigned char *uuid,
char *uuidstr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
......@@ -31,7 +31,7 @@
#include "virautoclean.h"
xmlXPathContextPtr virXMLXPathContextNew(xmlDocPtr xml)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
int virXPathBoolean(const char *xpath,
xmlXPathContextPtr ctxt);
......@@ -221,7 +221,7 @@ virXMLFormatElement(virBufferPtr buf,
const char *name,
virBufferPtr attrBuf,
virBufferPtr childBuf)
ATTRIBUTE_RETURN_CHECK;
G_GNUC_WARN_UNUSED_RESULT;
struct _virXPathContextNodeSave {
xmlXPathContextPtr ctxt;
......
......@@ -24,6 +24,6 @@
char *virshGetDomainDescription(vshControl *ctl, virDomainPtr dom,
bool title, unsigned int flags)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT;
extern const vshCmdDef domMonitoringCmds[];
......@@ -98,7 +98,7 @@ virshDomainGetXMLFromDom(vshControl *ctl,
xmlDocPtr *xml,
xmlXPathContextPtr *ctxt)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
int
virshDomainGetXML(vshControl *ctl,
......@@ -107,4 +107,4 @@ virshDomainGetXML(vshControl *ctl,
xmlDocPtr *xml,
xmlXPathContextPtr *ctxt)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4)
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(5) G_GNUC_WARN_UNUSED_RESULT;
......@@ -255,39 +255,39 @@ bool vshCmdGrpHelp(vshControl *ctl, const vshCmdGrp *grp);
int vshCommandOptInt(vshControl *ctl, const vshCmd *cmd,
const char *name, int *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptUInt(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned int *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptUIntWrap(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned int *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptUL(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned long *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptULWrap(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned long *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptStringQuiet(vshControl *ctl, const vshCmd *cmd,
const char *name, const char **value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptStringReq(vshControl *ctl, const vshCmd *cmd,
const char *name, const char **value)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptLongLong(vshControl *ctl, const vshCmd *cmd,
const char *name, long long *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptULongLong(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned long long *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptULongLongWrap(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned long long *value)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshCommandOptScaledInt(vshControl *ctl, const vshCmd *cmd,
const char *name, unsigned long long *value,
int scale, unsigned long long max)
ATTRIBUTE_NONNULL(4) ATTRIBUTE_RETURN_CHECK;
ATTRIBUTE_NONNULL(4) G_GNUC_WARN_UNUSED_RESULT;
int vshBlockJobOptionBandwidth(vshControl *ctl,
const vshCmd *cmd,
bool bytes,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册