mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Require a semicolon for VIR_ONCE_GLOBAL_INIT calls
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>). VIR_ONCE_GLOBAL_INIT is almost exclusively called without an ending semicolon, but let's standardize on using one like the other macros. Add a dummy struct definition at the end of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
8bec5488a6
commit
af36f8a641
@ -43,7 +43,7 @@ static int virBhyveConfigOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virBhyveConfig)
|
||||
VIR_ONCE_GLOBAL_INIT(virBhyveConfig);
|
||||
|
||||
virBhyveDriverConfigPtr
|
||||
virBhyveDriverConfigNew(void)
|
||||
|
@ -63,7 +63,7 @@ static int virCapabilitiesOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virCapabilities)
|
||||
VIR_ONCE_GLOBAL_INIT(virCapabilities);
|
||||
|
||||
/**
|
||||
* virCapabilitiesNew:
|
||||
|
@ -49,7 +49,7 @@ static int virDomainCapsOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainCaps)
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainCaps);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -1067,7 +1067,7 @@ static int virDomainObjOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainObj);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -338,7 +338,7 @@ virDomainEventsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainEvents)
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainEvents);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -64,7 +64,7 @@ virNetworkEventsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetworkEvents)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetworkEvents);
|
||||
|
||||
static void
|
||||
virNetworkEventDispose(void *obj)
|
||||
|
@ -78,7 +78,7 @@ virNodeDeviceEventsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNodeDeviceEvents)
|
||||
VIR_ONCE_GLOBAL_INIT(virNodeDeviceEvents);
|
||||
|
||||
static void
|
||||
virNodeDeviceEventDispose(void *obj)
|
||||
|
@ -99,7 +99,7 @@ virObjectEventOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virObjectEvent)
|
||||
VIR_ONCE_GLOBAL_INIT(virObjectEvent);
|
||||
|
||||
/**
|
||||
* virClassForObjectEvent:
|
||||
|
@ -77,7 +77,7 @@ virSecretEventsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virSecretEvents)
|
||||
VIR_ONCE_GLOBAL_INIT(virSecretEvents);
|
||||
|
||||
static void
|
||||
virSecretEventDispose(void *obj)
|
||||
|
@ -78,7 +78,7 @@ virStoragePoolEventsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virStoragePoolEvents)
|
||||
VIR_ONCE_GLOBAL_INIT(virStoragePoolEvents);
|
||||
|
||||
static void
|
||||
virStoragePoolEventDispose(void *obj)
|
||||
|
@ -60,7 +60,7 @@ static int virDomainObjListOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainObjList)
|
||||
VIR_ONCE_GLOBAL_INIT(virDomainObjList);
|
||||
|
||||
virDomainObjListPtr virDomainObjListNew(void)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ virInterfaceObjOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virInterfaceObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virInterfaceObj);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -84,7 +84,7 @@ virNetworkObjOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetworkObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetworkObj);
|
||||
|
||||
virNetworkObjPtr
|
||||
virNetworkObjNew(void)
|
||||
|
@ -69,7 +69,7 @@ virNodeDeviceObjOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNodeDeviceObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virNodeDeviceObj);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -51,7 +51,7 @@ virNWFilterBindingObjOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNWFilterBindingObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virNWFilterBindingObj);
|
||||
|
||||
virNWFilterBindingObjPtr
|
||||
virNWFilterBindingObjNew(void)
|
||||
|
@ -52,7 +52,7 @@ static int virNWFilterBindingObjListOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNWFilterBindingObjList)
|
||||
VIR_ONCE_GLOBAL_INIT(virNWFilterBindingObjList);
|
||||
|
||||
|
||||
virNWFilterBindingObjListPtr
|
||||
|
@ -78,7 +78,7 @@ virSecretObjOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virSecretObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virSecretObj);
|
||||
|
||||
static virSecretObjPtr
|
||||
virSecretObjNew(void)
|
||||
|
@ -120,7 +120,7 @@ virStorageVolObjOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virStorageVolObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virStorageVolObj);
|
||||
|
||||
|
||||
static virStorageVolObjPtr
|
||||
@ -211,7 +211,7 @@ virStoragePoolObjOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virStoragePoolObj)
|
||||
VIR_ONCE_GLOBAL_INIT(virStoragePoolObj);
|
||||
|
||||
|
||||
virStoragePoolObjPtr
|
||||
|
@ -109,7 +109,7 @@ virDataTypesOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virDataTypes)
|
||||
VIR_ONCE_GLOBAL_INIT(virDataTypes);
|
||||
|
||||
/**
|
||||
* virGetConnect:
|
||||
|
@ -59,7 +59,7 @@ virNetcfDriverStateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetcfDriverState)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetcfDriverState);
|
||||
|
||||
static virNetcfDriverStatePtr driver;
|
||||
|
||||
|
@ -66,7 +66,7 @@ static int libxlConfigOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(libxlConfig)
|
||||
VIR_ONCE_GLOBAL_INIT(libxlConfig);
|
||||
|
||||
static void
|
||||
libxlDriverConfigDispose(void *obj)
|
||||
|
@ -61,7 +61,7 @@ libxlDomainObjPrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(libxlDomainObjPrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(libxlDomainObjPrivate);
|
||||
|
||||
static int
|
||||
libxlDomainObjInitJob(libxlDomainObjPrivatePtr priv)
|
||||
|
@ -248,7 +248,7 @@ libxlMigrationDstArgsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(libxlMigrationDstArgs)
|
||||
VIR_ONCE_GLOBAL_INIT(libxlMigrationDstArgs);
|
||||
|
||||
static void
|
||||
libxlDoMigrateDstReceive(void *opaque)
|
||||
|
@ -82,7 +82,7 @@ virLogHandlerOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virLogHandler)
|
||||
VIR_ONCE_GLOBAL_INIT(virLogHandler);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -51,7 +51,7 @@ static int virLXCConfigOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCConfig)
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCConfig);
|
||||
|
||||
|
||||
/* Functions */
|
||||
|
@ -57,7 +57,7 @@ static int virLXCMonitorOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCMonitor)
|
||||
VIR_ONCE_GLOBAL_INIT(virLXCMonitor);
|
||||
|
||||
static void
|
||||
virLXCMonitorHandleEventExit(virNetClientProgramPtr prog,
|
||||
|
@ -97,7 +97,7 @@ udevEventDataOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(udevEventData)
|
||||
VIR_ONCE_GLOBAL_INIT(udevEventData);
|
||||
|
||||
static udevEventDataPtr
|
||||
udevEventDataNew(void)
|
||||
|
@ -140,7 +140,7 @@ static int qemuAgentOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuAgent)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuAgent);
|
||||
|
||||
|
||||
#if DEBUG_RAW_IO
|
||||
|
@ -66,7 +66,7 @@ qemuBlockJobDataOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuBlockJobData)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuBlockJobData);
|
||||
|
||||
static qemuBlockJobDataPtr
|
||||
qemuBlockJobDataNew(qemuBlockJobType type,
|
||||
|
@ -615,7 +615,7 @@ static int virQEMUCapsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virQEMUCaps)
|
||||
VIR_ONCE_GLOBAL_INIT(virQEMUCaps);
|
||||
|
||||
static virArch virQEMUCapsArchFromString(const char *arch)
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ static int virQEMUConfigOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virQEMUConfig)
|
||||
VIR_ONCE_GLOBAL_INIT(virQEMUConfig);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -156,7 +156,7 @@ qemuDomainOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomain)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomain);
|
||||
|
||||
static void
|
||||
qemuDomainLogContextDispose(void *obj)
|
||||
@ -1051,7 +1051,7 @@ qemuDomainDiskPrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainDiskPrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainDiskPrivate);
|
||||
|
||||
static virObjectPtr
|
||||
qemuDomainDiskPrivateNew(void)
|
||||
@ -1090,7 +1090,7 @@ qemuDomainStorageSourcePrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainStorageSourcePrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainStorageSourcePrivate);
|
||||
|
||||
virObjectPtr
|
||||
qemuDomainStorageSourcePrivateNew(void)
|
||||
@ -1129,7 +1129,7 @@ qemuDomainVcpuPrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainVcpuPrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainVcpuPrivate);
|
||||
|
||||
static virObjectPtr
|
||||
qemuDomainVcpuPrivateNew(void)
|
||||
@ -1169,7 +1169,7 @@ qemuDomainChrSourcePrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainChrSourcePrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainChrSourcePrivate);
|
||||
|
||||
static virObjectPtr
|
||||
qemuDomainChrSourcePrivateNew(void)
|
||||
@ -1207,7 +1207,7 @@ qemuDomainVsockPrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainVsockPrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainVsockPrivate);
|
||||
|
||||
static virObjectPtr
|
||||
qemuDomainVsockPrivateNew(void)
|
||||
@ -1247,7 +1247,7 @@ qemuDomainGraphicsPrivateOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainGraphicsPrivate)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuDomainGraphicsPrivate);
|
||||
|
||||
static virObjectPtr
|
||||
qemuDomainGraphicsPrivateNew(void)
|
||||
|
@ -165,7 +165,7 @@ static int qemuMonitorOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(qemuMonitor)
|
||||
VIR_ONCE_GLOBAL_INIT(qemuMonitor);
|
||||
|
||||
|
||||
VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
|
||||
|
@ -62,7 +62,7 @@ static int virKeepAliveOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virKeepAlive)
|
||||
VIR_ONCE_GLOBAL_INIT(virKeepAlive);
|
||||
|
||||
static virNetMessagePtr
|
||||
virKeepAliveMessage(virKeepAlivePtr ka, int proc)
|
||||
|
@ -124,7 +124,7 @@ static int virNetClientOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetClient)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetClient);
|
||||
|
||||
static void virNetClientIOEventLoopPassTheBuck(virNetClientPtr client,
|
||||
virNetClientCallPtr thiscall);
|
||||
|
@ -58,7 +58,7 @@ static int virNetClientProgramOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetClientProgram)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetClientProgram);
|
||||
|
||||
|
||||
virNetClientProgramPtr virNetClientProgramNew(unsigned program,
|
||||
|
@ -75,7 +75,7 @@ static int virNetClientStreamOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetClientStream)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetClientStream);
|
||||
|
||||
|
||||
static void
|
||||
|
@ -113,7 +113,7 @@ virNetDaemonOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetDaemon)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetDaemon);
|
||||
|
||||
|
||||
virNetDaemonPtr
|
||||
|
@ -66,7 +66,7 @@ static int virNetSASLContextOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetSASLContext)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetSASLContext);
|
||||
|
||||
/* Apple have annotated all SASL functions as deprecated for
|
||||
* unknown reasons. Since they still work, lets just ignore
|
||||
|
@ -96,7 +96,7 @@ static int virNetServerOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServer)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServer);
|
||||
|
||||
unsigned long long virNetServerNextClientID(virNetServerPtr srv)
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ static int virNetServerClientOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServerClient)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServerClient);
|
||||
|
||||
|
||||
static void virNetServerClientDispatchEvent(virNetSocketPtr sock, int events, void *opaque);
|
||||
|
@ -55,7 +55,7 @@ static int virNetServerProgramOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServerProgram)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServerProgram);
|
||||
|
||||
|
||||
virNetServerProgramPtr virNetServerProgramNew(unsigned program,
|
||||
|
@ -59,7 +59,7 @@ static int virNetServerServiceOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServerService)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetServerService);
|
||||
|
||||
|
||||
static void virNetServerServiceAccept(virNetSocketPtr sock,
|
||||
|
@ -128,7 +128,7 @@ static int virNetSocketOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetSocket)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetSocket);
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
|
@ -96,7 +96,7 @@ static int virNetTLSContextOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virNetTLSContext)
|
||||
VIR_ONCE_GLOBAL_INIT(virNetTLSContext);
|
||||
|
||||
|
||||
static int
|
||||
|
@ -133,7 +133,7 @@ static int testDriverOnceInit(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
VIR_ONCE_GLOBAL_INIT(testDriver)
|
||||
VIR_ONCE_GLOBAL_INIT(testDriver);
|
||||
|
||||
#define TEST_MODEL "i686"
|
||||
#define TEST_EMULATOR "/usr/bin/test-hv"
|
||||
|
@ -55,7 +55,7 @@ static int virCloseCallbacksOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virCloseCallbacks)
|
||||
VIR_ONCE_GLOBAL_INIT(virCloseCallbacks);
|
||||
|
||||
|
||||
virCloseCallbacksPtr
|
||||
|
@ -58,7 +58,7 @@ virDevMapperOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virDevMapper)
|
||||
VIR_ONCE_GLOBAL_INIT(virDevMapper);
|
||||
|
||||
|
||||
static int
|
||||
|
@ -643,7 +643,7 @@ static int dnsmasqCapsOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(dnsmasqCaps)
|
||||
VIR_ONCE_GLOBAL_INIT(dnsmasqCaps);
|
||||
|
||||
static void
|
||||
dnsmasqCapsSet(dnsmasqCapsPtr caps,
|
||||
|
@ -135,7 +135,7 @@ static int virFDStreamDataOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virFDStreamData)
|
||||
VIR_ONCE_GLOBAL_INIT(virFDStreamData);
|
||||
|
||||
|
||||
static int
|
||||
|
@ -93,7 +93,7 @@ virFileCacheOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virFileCache)
|
||||
VIR_ONCE_GLOBAL_INIT(virFileCache);
|
||||
|
||||
|
||||
static char *
|
||||
|
@ -93,7 +93,7 @@ virFirewallOnceInit(void)
|
||||
return virFirewallValidateBackend(currentBackend);
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virFirewall)
|
||||
VIR_ONCE_GLOBAL_INIT(virFirewall);
|
||||
|
||||
static bool iptablesUseLock;
|
||||
static bool ip6tablesUseLock;
|
||||
|
@ -77,7 +77,7 @@ static int virHashAtomicOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virHashAtomic)
|
||||
VIR_ONCE_GLOBAL_INIT(virHashAtomic);
|
||||
|
||||
|
||||
static uint32_t virHashStrCode(const void *name, uint32_t seed)
|
||||
|
@ -124,7 +124,7 @@ static int virHostdevManagerOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virHostdevManager)
|
||||
VIR_ONCE_GLOBAL_INIT(virHostdevManager);
|
||||
|
||||
static void
|
||||
virHostdevManagerDispose(void *obj)
|
||||
|
@ -67,7 +67,7 @@ static int virIdentityOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virIdentity)
|
||||
VIR_ONCE_GLOBAL_INIT(virIdentity);
|
||||
|
||||
/**
|
||||
* virIdentityGetCurrent:
|
||||
|
@ -298,7 +298,7 @@ virLogOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virLog)
|
||||
VIR_ONCE_GLOBAL_INIT(virLog);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ virMediatedOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virMediated)
|
||||
VIR_ONCE_GLOBAL_INIT(virMediated);
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
|
@ -203,7 +203,7 @@ static int virPCIOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virPCI)
|
||||
VIR_ONCE_GLOBAL_INIT(virPCI);
|
||||
|
||||
|
||||
static char *
|
||||
|
@ -91,7 +91,7 @@ virPortAllocatorOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virPortAllocator)
|
||||
VIR_ONCE_GLOBAL_INIT(virPortAllocator);
|
||||
|
||||
virPortAllocatorRangePtr
|
||||
virPortAllocatorRangeNew(const char *name,
|
||||
|
@ -443,7 +443,7 @@ virResctrlOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virResctrl)
|
||||
VIR_ONCE_GLOBAL_INIT(virResctrl);
|
||||
|
||||
|
||||
/* Common functions */
|
||||
|
@ -84,7 +84,7 @@ virSCSIOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virSCSI)
|
||||
VIR_ONCE_GLOBAL_INIT(virSCSI);
|
||||
|
||||
static int
|
||||
virSCSIDeviceGetAdapterId(const char *adapter,
|
||||
|
@ -73,7 +73,7 @@ virSCSIVHostOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virSCSIVHost)
|
||||
VIR_ONCE_GLOBAL_INIT(virSCSIVHost);
|
||||
|
||||
|
||||
int
|
||||
|
@ -83,7 +83,7 @@ static int virStorageFileBackendOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virStorageFileBackend)
|
||||
VIR_ONCE_GLOBAL_INIT(virStorageFileBackend);
|
||||
|
||||
int
|
||||
virStorageFileBackendRegister(virStorageFileBackendPtr backend)
|
||||
|
@ -181,7 +181,7 @@ int virThreadLocalSet(virThreadLocalPtr l, void*) ATTRIBUTE_RETURN_CHECK;
|
||||
*
|
||||
* Then invoking the macro:
|
||||
*
|
||||
* VIR_ONCE_GLOBAL_INIT(virMyObject)
|
||||
* VIR_ONCE_GLOBAL_INIT(virMyObject);
|
||||
*
|
||||
* Will create a method
|
||||
*
|
||||
@ -211,6 +211,7 @@ int virThreadLocalSet(virThreadLocalPtr l, void*) ATTRIBUTE_RETURN_CHECK;
|
||||
} \
|
||||
\
|
||||
return 0; \
|
||||
}
|
||||
} \
|
||||
struct classname ## EatSemicolon
|
||||
|
||||
#endif /* LIBVIRT_VIRTHREAD_H */
|
||||
|
@ -42,7 +42,7 @@ virThreadJobOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virThreadJob)
|
||||
VIR_ONCE_GLOBAL_INIT(virThreadJob);
|
||||
|
||||
|
||||
const char *
|
||||
|
@ -79,7 +79,7 @@ static int virUSBOnceInit(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(virUSB)
|
||||
VIR_ONCE_GLOBAL_INIT(virUSB);
|
||||
|
||||
static int virUSBSysReadFile(const char *f_name, const char *d_name,
|
||||
int base, unsigned int *value)
|
||||
|
@ -161,7 +161,7 @@ static int vzDriverOnceInit(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
VIR_ONCE_GLOBAL_INIT(vzDriver)
|
||||
VIR_ONCE_GLOBAL_INIT(vzDriver);
|
||||
|
||||
vzDriverPtr
|
||||
vzGetDriverConnection(void)
|
||||
|
@ -57,7 +57,7 @@ testFileCacheObjOnceInit(void)
|
||||
}
|
||||
|
||||
|
||||
VIR_ONCE_GLOBAL_INIT(testFileCacheObj)
|
||||
VIR_ONCE_GLOBAL_INIT(testFileCacheObj);
|
||||
|
||||
|
||||
static testFileCacheObjPtr
|
||||
|
Loading…
Reference in New Issue
Block a user