mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
tests: use G_GNUC_UNUSED
Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
7c655468e8
commit
0d94f02455
@ -19,19 +19,19 @@ void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
|
||||
addr->addr[5] = 0;
|
||||
}
|
||||
|
||||
int virNetDevTapCreateInBridgePort(const char *brname ATTRIBUTE_UNUSED,
|
||||
int virNetDevTapCreateInBridgePort(const char *brname G_GNUC_UNUSED,
|
||||
char **ifname,
|
||||
const virMacAddr *macaddr ATTRIBUTE_UNUSED,
|
||||
const unsigned char *vmuuid ATTRIBUTE_UNUSED,
|
||||
const char *tunpath ATTRIBUTE_UNUSED,
|
||||
int *tapfd ATTRIBUTE_UNUSED,
|
||||
size_t tapfdSize ATTRIBUTE_UNUSED,
|
||||
virNetDevVPortProfilePtr virtPortProfile ATTRIBUTE_UNUSED,
|
||||
virNetDevVlanPtr virtVlan ATTRIBUTE_UNUSED,
|
||||
virNetDevCoalescePtr coalesce ATTRIBUTE_UNUSED,
|
||||
unsigned int mtu ATTRIBUTE_UNUSED,
|
||||
unsigned int *actualMTU ATTRIBUTE_UNUSED,
|
||||
unsigned int fakeflags ATTRIBUTE_UNUSED)
|
||||
const virMacAddr *macaddr G_GNUC_UNUSED,
|
||||
const unsigned char *vmuuid G_GNUC_UNUSED,
|
||||
const char *tunpath G_GNUC_UNUSED,
|
||||
int *tapfd G_GNUC_UNUSED,
|
||||
size_t tapfdSize G_GNUC_UNUSED,
|
||||
virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED,
|
||||
virNetDevVlanPtr virtVlan G_GNUC_UNUSED,
|
||||
virNetDevCoalescePtr coalesce G_GNUC_UNUSED,
|
||||
unsigned int mtu G_GNUC_UNUSED,
|
||||
unsigned int *actualMTU G_GNUC_UNUSED,
|
||||
unsigned int fakeflags G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_FREE(*ifname);
|
||||
if (VIR_STRDUP(*ifname, "vnet0") < 0)
|
||||
@ -39,7 +39,7 @@ int virNetDevTapCreateInBridgePort(const char *brname ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *virNetDevTapGetRealDeviceName(char *name ATTRIBUTE_UNUSED)
|
||||
char *virNetDevTapGetRealDeviceName(char *name G_GNUC_UNUSED)
|
||||
{
|
||||
char *fakename;
|
||||
|
||||
@ -48,15 +48,15 @@ char *virNetDevTapGetRealDeviceName(char *name ATTRIBUTE_UNUSED)
|
||||
return fakename;
|
||||
}
|
||||
|
||||
int virNetDevSetOnline(const char *ifname ATTRIBUTE_UNUSED,
|
||||
bool online ATTRIBUTE_UNUSED)
|
||||
int virNetDevSetOnline(const char *ifname G_GNUC_UNUSED,
|
||||
bool online G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bind(int sockfd ATTRIBUTE_UNUSED,
|
||||
const struct sockaddr *addr ATTRIBUTE_UNUSED,
|
||||
socklen_t addrlen ATTRIBUTE_UNUSED)
|
||||
int bind(int sockfd G_GNUC_UNUSED,
|
||||
const struct sockaddr *addr G_GNUC_UNUSED,
|
||||
socklen_t addrlen G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ static int checkoutput(const char *testname,
|
||||
* Only stdin/out/err open
|
||||
* No slot for return status must log error.
|
||||
*/
|
||||
static int test0(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test0(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd;
|
||||
int ret = -1;
|
||||
@ -140,7 +140,7 @@ static int test0(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Only stdin/out/err open
|
||||
* Capturing return status must not log error.
|
||||
*/
|
||||
static int test1(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test1(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd;
|
||||
int ret = -1;
|
||||
@ -168,7 +168,7 @@ static int test1(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program (twice), no args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test2(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test2(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
int ret;
|
||||
@ -199,7 +199,7 @@ static int test2(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit all ENV, keep CWD.
|
||||
* stdin/out/err + two extra FD open
|
||||
*/
|
||||
static int test3(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test3(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
int newfd1 = dup(STDERR_FILENO);
|
||||
@ -239,7 +239,7 @@ static int test3(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Only stdin/out/err open.
|
||||
* Daemonized
|
||||
*/
|
||||
static int test4(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test4(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
char *pidfile = virPidFileBuildPath(abs_builddir, "commandhelper");
|
||||
@ -279,7 +279,7 @@ static int test4(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit filtered ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test5(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test5(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
|
||||
@ -301,7 +301,7 @@ static int test5(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit filtered ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test6(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test6(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
|
||||
@ -324,7 +324,7 @@ static int test6(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit filtered ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test7(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test7(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
|
||||
@ -347,7 +347,7 @@ static int test7(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit filtered ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test8(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test8(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
|
||||
@ -372,7 +372,7 @@ static int test8(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, some args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test9(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test9(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
const char* const args[] = { "arg1", "arg2", NULL };
|
||||
@ -409,7 +409,7 @@ static int test9(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, some args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test10(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test10(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
const char *const args[] = {
|
||||
@ -433,7 +433,7 @@ static int test10(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, some args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test11(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test11(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
const char *args[] = {
|
||||
abs_builddir "/commandhelper",
|
||||
@ -456,7 +456,7 @@ static int test11(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open. Set stdin data
|
||||
*/
|
||||
static int test12(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test12(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
|
||||
@ -477,7 +477,7 @@ static int test12(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open. Set stdin data
|
||||
*/
|
||||
static int test13(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test13(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
char *outactual = NULL;
|
||||
@ -516,7 +516,7 @@ static int test13(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit all ENV, keep CWD.
|
||||
* Only stdin/out/err open. Set stdin data
|
||||
*/
|
||||
static int test14(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test14(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
char *outactual = NULL;
|
||||
@ -589,7 +589,7 @@ static int test14(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit all ENV, change CWD.
|
||||
* Only stdin/out/err open
|
||||
*/
|
||||
static int test15(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test15(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
char *cwd = NULL;
|
||||
@ -617,7 +617,7 @@ static int test15(const void *unused ATTRIBUTE_UNUSED)
|
||||
/*
|
||||
* Don't run program; rather, log what would be run.
|
||||
*/
|
||||
static int test16(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test16(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew("true");
|
||||
char *outactual = NULL;
|
||||
@ -662,7 +662,7 @@ static int test16(const void *unused ATTRIBUTE_UNUSED)
|
||||
/*
|
||||
* Test string handling when no output is present.
|
||||
*/
|
||||
static int test17(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test17(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew("true");
|
||||
int ret = -1;
|
||||
@ -718,7 +718,7 @@ static int test17(const void *unused ATTRIBUTE_UNUSED)
|
||||
/*
|
||||
* Run long-running daemon, to ensure no hang.
|
||||
*/
|
||||
static int test18(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test18(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNewArgList("sleep", "100", NULL);
|
||||
char *pidfile = virPidFileBuildPath(abs_builddir, "commandhelper");
|
||||
@ -766,7 +766,7 @@ static int test18(const void *unused ATTRIBUTE_UNUSED)
|
||||
/*
|
||||
* Asynchronously run long-running daemon, to ensure no hang.
|
||||
*/
|
||||
static int test19(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test19(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNewArgList("sleep", "100", NULL);
|
||||
pid_t pid;
|
||||
@ -803,7 +803,7 @@ static int test19(const void *unused ATTRIBUTE_UNUSED)
|
||||
* Run program, no args, inherit all ENV, keep CWD.
|
||||
* Ignore huge stdin data, to provoke SIGPIPE or EPIPE in parent.
|
||||
*/
|
||||
static int test20(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test20(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNewArgList(abs_builddir "/commandhelper",
|
||||
"--close-stdin", NULL);
|
||||
@ -846,7 +846,7 @@ static const char *const newenv[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
static int test21(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test21(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
int ret = -1;
|
||||
@ -894,7 +894,7 @@ static int test21(const void *unused ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
test22(const void *unused ATTRIBUTE_UNUSED)
|
||||
test22(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virCommandPtr cmd;
|
||||
@ -947,7 +947,7 @@ test22(const void *unused ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
test23(const void *unused ATTRIBUTE_UNUSED)
|
||||
test23(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
/* Not strictly a virCommand test, but this is the easiest place
|
||||
* to test this lower-level interface. It takes a double fork to
|
||||
@ -1003,7 +1003,7 @@ test23(const void *unused ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int test25(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test25(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int pipeFD[2] = { -1, -1};
|
||||
@ -1081,7 +1081,7 @@ static int test25(const void *unused ATTRIBUTE_UNUSED)
|
||||
/*
|
||||
* Don't run program; rather, log what would be run.
|
||||
*/
|
||||
static int test26(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test26(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew("true");
|
||||
char *outactual = NULL;
|
||||
@ -1139,7 +1139,7 @@ static int test26(const void *unused ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int test27(const void *unused ATTRIBUTE_UNUSED)
|
||||
static int test27(const void *unused G_GNUC_UNUSED)
|
||||
{
|
||||
virCommandPtr cmd = virCommandNew(abs_builddir "/commandhelper");
|
||||
int pipe1[2];
|
||||
@ -1277,8 +1277,8 @@ static void virCommandThreadWorker(void *opaque)
|
||||
}
|
||||
|
||||
static void
|
||||
virCommandTestFreeTimer(int timer ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
virCommandTestFreeTimer(int timer G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
/* nothing to be done here */
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ static struct testPath paths[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testParseDatastorePath(const void *data ATTRIBUTE_UNUSED)
|
||||
testParseDatastorePath(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int result = 0;
|
||||
size_t i;
|
||||
@ -121,7 +121,7 @@ static struct testDateTime times[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testConvertDateTimeToCalendarTime(const void *data ATTRIBUTE_UNUSED)
|
||||
testConvertDateTimeToCalendarTime(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
esxVI_DateTime dateTime;
|
||||
@ -172,7 +172,7 @@ static struct testDatastoreItem datastoreItems[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testEscapeDatastoreItem(const void *data ATTRIBUTE_UNUSED)
|
||||
testEscapeDatastoreItem(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
char *escaped = NULL;
|
||||
@ -212,7 +212,7 @@ static struct testWindows1252ToUTF8 windows1252ToUTF8[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testConvertWindows1252ToUTF8(const void *data ATTRIBUTE_UNUSED)
|
||||
testConvertWindows1252ToUTF8(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
char *utf8 = NULL;
|
||||
|
@ -158,7 +158,7 @@ static pthread_cond_t eventThreadJobCond = PTHREAD_COND_INITIALIZER;
|
||||
static int eventThreadJobDone;
|
||||
|
||||
|
||||
G_GNUC_NORETURN static void *eventThreadLoop(void *data ATTRIBUTE_UNUSED) {
|
||||
G_GNUC_NORETURN static void *eventThreadLoop(void *data G_GNUC_UNUSED) {
|
||||
while (1) {
|
||||
pthread_mutex_lock(&eventThreadMutex);
|
||||
while (!eventThreadRunOnce)
|
||||
|
@ -90,7 +90,7 @@ static const char test11_xml[] =
|
||||
|
||||
/* Test virIsVHBACapable */
|
||||
static int
|
||||
test1(const void *data ATTRIBUTE_UNUSED)
|
||||
test1(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
if (virVHBAPathExists(TEST_FC_HOST_PREFIX, TEST_FC_HOST_NUM) &&
|
||||
virVHBAPathExists(TEST_FC_HOST_PREFIX, TEST_FC_HOST_NUM_NO_FAB))
|
||||
@ -101,7 +101,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Test virVHBAIsVportCapable */
|
||||
static int
|
||||
test2(const void *data ATTRIBUTE_UNUSED)
|
||||
test2(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
if (virVHBAIsVportCapable(TEST_FC_HOST_PREFIX, TEST_FC_HOST_NUM))
|
||||
return 0;
|
||||
@ -111,7 +111,7 @@ test2(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Test virVHBAGetConfig */
|
||||
static int
|
||||
test3(const void *data ATTRIBUTE_UNUSED)
|
||||
test3(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *expect_wwnn = "2001001b32a9da4e";
|
||||
const char *expect_wwpn = "2101001b32a9da4e";
|
||||
@ -165,7 +165,7 @@ test3(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Test virVHBAGetHostByWWN */
|
||||
static int
|
||||
test4(const void *data ATTRIBUTE_UNUSED)
|
||||
test4(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *expect_hostname = "host5";
|
||||
char *hostname = NULL;
|
||||
@ -190,7 +190,7 @@ test4(const void *data ATTRIBUTE_UNUSED)
|
||||
* NB: host4 is not Online, so it should not be found
|
||||
*/
|
||||
static int
|
||||
test5(const void *data ATTRIBUTE_UNUSED)
|
||||
test5(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *expect_hostname = "host5";
|
||||
char *hostname = NULL;
|
||||
@ -210,7 +210,7 @@ test5(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Test virVHBAGetConfig fabric name optional */
|
||||
static int
|
||||
test6(const void *data ATTRIBUTE_UNUSED)
|
||||
test6(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *expect_wwnn = "2002001b32a9da4e";
|
||||
const char *expect_wwpn = "2102001b32a9da4e";
|
||||
|
@ -44,13 +44,13 @@
|
||||
# endif
|
||||
|
||||
static void
|
||||
testCommandDryRun(const char *const*args ATTRIBUTE_UNUSED,
|
||||
const char *const*env ATTRIBUTE_UNUSED,
|
||||
const char *input ATTRIBUTE_UNUSED,
|
||||
testCommandDryRun(const char *const*args G_GNUC_UNUSED,
|
||||
const char *const*env G_GNUC_UNUSED,
|
||||
const char *input G_GNUC_UNUSED,
|
||||
char **output,
|
||||
char **error,
|
||||
int *status,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
*status = 0;
|
||||
ignore_value(VIR_STRDUP_QUIET(*output, ""));
|
||||
|
@ -21,8 +21,8 @@
|
||||
#include "internal.h"
|
||||
#include "libvirt_nss.h"
|
||||
|
||||
int main(int argc ATTRIBUTE_UNUSED,
|
||||
char *argv[] ATTRIBUTE_UNUSED)
|
||||
int main(int argc G_GNUC_UNUSED,
|
||||
char *argv[] G_GNUC_UNUSED)
|
||||
{
|
||||
int err, herrno; /* Dummy variables to prevent SIGSEGV */
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
||||
"ebtables -t nat -X libvirt-P-vnet0\n"
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesAllTeardown(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesAllTeardown(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
@ -130,7 +130,7 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesTearOldRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesTearOldRules(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
@ -201,7 +201,7 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesRemoveBasicRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesRemoveBasicRules(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
@ -250,7 +250,7 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesTearNewRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesTearNewRules(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
@ -284,7 +284,7 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesApplyBasicRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesApplyBasicRules(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
@ -356,7 +356,7 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
@ -447,7 +447,7 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testNWFilterEBIPTablesApplyDropAllRules(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNWFilterEBIPTablesApplyDropAllRules(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
const char *expected =
|
||||
|
@ -101,10 +101,10 @@ typedef struct {
|
||||
|
||||
|
||||
static int
|
||||
domainLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom ATTRIBUTE_UNUSED,
|
||||
domainLifecycleCb(virConnectPtr conn G_GNUC_UNUSED,
|
||||
virDomainPtr dom G_GNUC_UNUSED,
|
||||
int event,
|
||||
int detail ATTRIBUTE_UNUSED,
|
||||
int detail G_GNUC_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
lifecycleEventCounter *counter = opaque;
|
||||
@ -130,10 +130,10 @@ domainLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static void
|
||||
networkLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virNetworkPtr net ATTRIBUTE_UNUSED,
|
||||
networkLifecycleCb(virConnectPtr conn G_GNUC_UNUSED,
|
||||
virNetworkPtr net G_GNUC_UNUSED,
|
||||
int event,
|
||||
int detail ATTRIBUTE_UNUSED,
|
||||
int detail G_GNUC_UNUSED,
|
||||
void* opaque)
|
||||
{
|
||||
lifecycleEventCounter *counter = opaque;
|
||||
@ -149,10 +149,10 @@ networkLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static void
|
||||
storagePoolLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
storagePoolLifecycleCb(virConnectPtr conn G_GNUC_UNUSED,
|
||||
virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
int event,
|
||||
int detail ATTRIBUTE_UNUSED,
|
||||
int detail G_GNUC_UNUSED,
|
||||
void* opaque)
|
||||
{
|
||||
lifecycleEventCounter *counter = opaque;
|
||||
@ -172,8 +172,8 @@ storagePoolLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static void
|
||||
storagePoolRefreshCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virStoragePoolPtr pool ATTRIBUTE_UNUSED,
|
||||
storagePoolRefreshCb(virConnectPtr conn G_GNUC_UNUSED,
|
||||
virStoragePoolPtr pool G_GNUC_UNUSED,
|
||||
void* opaque)
|
||||
{
|
||||
int *counter = opaque;
|
||||
@ -182,10 +182,10 @@ storagePoolRefreshCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static void
|
||||
nodeDeviceLifecycleCb(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virNodeDevicePtr dev ATTRIBUTE_UNUSED,
|
||||
nodeDeviceLifecycleCb(virConnectPtr conn G_GNUC_UNUSED,
|
||||
virNodeDevicePtr dev G_GNUC_UNUSED,
|
||||
int event,
|
||||
int detail ATTRIBUTE_UNUSED,
|
||||
int detail G_GNUC_UNUSED,
|
||||
void* opaque)
|
||||
{
|
||||
lifecycleEventCounter *counter = opaque;
|
||||
@ -824,7 +824,7 @@ testNodeDeviceCreateXML(const void *data)
|
||||
}
|
||||
|
||||
static void
|
||||
timeout(int id ATTRIBUTE_UNUSED, void *opaque ATTRIBUTE_UNUSED)
|
||||
timeout(int id G_GNUC_UNUSED, void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
fputs("test taking too long; giving up", stderr);
|
||||
_exit(EXIT_FAILURE);
|
||||
|
@ -14,8 +14,8 @@
|
||||
# define VIR_FROM_THIS VIR_FROM_OPENVZ
|
||||
|
||||
static int
|
||||
testLocateConfFile(int vpsid ATTRIBUTE_UNUSED, char **conffile,
|
||||
const char *ext ATTRIBUTE_UNUSED)
|
||||
testLocateConfFile(int vpsid G_GNUC_UNUSED, char **conffile,
|
||||
const char *ext G_GNUC_UNUSED)
|
||||
{
|
||||
return virAsprintf(conffile, "%s/openvzutilstest.conf", abs_srcdir);
|
||||
}
|
||||
@ -33,7 +33,7 @@ static struct testConfigParam configParams[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testReadConfigParam(const void *data ATTRIBUTE_UNUSED)
|
||||
testReadConfigParam(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int result = -1;
|
||||
size_t i;
|
||||
@ -68,7 +68,7 @@ testReadConfigParam(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testReadNetworkConf(const void *data ATTRIBUTE_UNUSED)
|
||||
testReadNetworkConf(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int result = -1;
|
||||
virDomainDefPtr def = NULL;
|
||||
|
@ -831,9 +831,9 @@ testQemuAgentArbitraryCommand(const void *data)
|
||||
|
||||
|
||||
static int
|
||||
qemuAgentTimeoutTestMonitorHandler(qemuMonitorTestPtr test ATTRIBUTE_UNUSED,
|
||||
qemuMonitorTestItemPtr item ATTRIBUTE_UNUSED,
|
||||
const char *cmdstr ATTRIBUTE_UNUSED)
|
||||
qemuAgentTimeoutTestMonitorHandler(qemuMonitorTestPtr test G_GNUC_UNUSED,
|
||||
qemuMonitorTestItemPtr item G_GNUC_UNUSED,
|
||||
const char *cmdstr G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
static void
|
||||
eventLoop(void *opaque ATTRIBUTE_UNUSED)
|
||||
eventLoop(void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
while (1) {
|
||||
if (virEventRunDefaultImpl() < 0) {
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
|
||||
virCPUDefPtr
|
||||
virQEMUCapsProbeHostCPU(virArch hostArch ATTRIBUTE_UNUSED,
|
||||
virDomainCapsCPUModelsPtr models ATTRIBUTE_UNUSED)
|
||||
virQEMUCapsProbeHostCPU(virArch hostArch G_GNUC_UNUSED,
|
||||
virDomainCapsCPUModelsPtr models G_GNUC_UNUSED)
|
||||
{
|
||||
const char *model = getenv("VIR_TEST_MOCK_FAKE_HOST_CPU");
|
||||
|
||||
|
@ -55,7 +55,7 @@ testParseFormatFW(const void *opaque)
|
||||
|
||||
|
||||
static int
|
||||
testFWPrecedence(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFWPrecedence(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_AUTOFREE(char *) fakehome = NULL;
|
||||
VIR_AUTOSTRINGLIST fwList = NULL;
|
||||
|
@ -360,8 +360,8 @@ qemuMonitorTestWorker(void *opaque)
|
||||
|
||||
|
||||
static void
|
||||
qemuMonitorTestFreeTimer(int timer ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
qemuMonitorTestFreeTimer(int timer G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
/* nothing to be done here */
|
||||
}
|
||||
@ -712,7 +712,7 @@ qemuMonitorTestAddItemVerbatim(qemuMonitorTestPtr test,
|
||||
|
||||
static int
|
||||
qemuMonitorTestProcessGuestAgentSync(qemuMonitorTestPtr test,
|
||||
qemuMonitorTestItemPtr item ATTRIBUTE_UNUSED,
|
||||
qemuMonitorTestItemPtr item G_GNUC_UNUSED,
|
||||
const char *cmdstr)
|
||||
{
|
||||
virJSONValuePtr val = NULL;
|
||||
@ -1011,17 +1011,17 @@ qemuMonitorTestAddItemExpect(qemuMonitorTestPtr test,
|
||||
|
||||
|
||||
static void
|
||||
qemuMonitorTestEOFNotify(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
qemuMonitorTestEOFNotify(qemuMonitorPtr mon G_GNUC_UNUSED,
|
||||
virDomainObjPtr vm G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
qemuMonitorTestErrorNotify(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
qemuMonitorTestErrorNotify(qemuMonitorPtr mon G_GNUC_UNUSED,
|
||||
virDomainObjPtr vm G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1034,8 +1034,8 @@ static qemuMonitorCallbacks qemuMonitorTestCallbacks = {
|
||||
|
||||
|
||||
static void
|
||||
qemuMonitorTestAgentNotify(qemuAgentPtr agent ATTRIBUTE_UNUSED,
|
||||
virDomainObjPtr vm ATTRIBUTE_UNUSED)
|
||||
qemuMonitorTestAgentNotify(qemuAgentPtr agent G_GNUC_UNUSED,
|
||||
virDomainObjPtr vm G_GNUC_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ mock_chown(const char *path,
|
||||
#include "virmockstathelpers.c"
|
||||
|
||||
static int
|
||||
virMockStatRedirect(const char *path ATTRIBUTE_UNUSED, char **newpath ATTRIBUTE_UNUSED)
|
||||
virMockStatRedirect(const char *path G_GNUC_UNUSED, char **newpath G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -364,19 +364,19 @@ close(int fd)
|
||||
}
|
||||
|
||||
|
||||
int virFileLock(int fd ATTRIBUTE_UNUSED,
|
||||
bool shared ATTRIBUTE_UNUSED,
|
||||
off_t start ATTRIBUTE_UNUSED,
|
||||
off_t len ATTRIBUTE_UNUSED,
|
||||
bool waitForLock ATTRIBUTE_UNUSED)
|
||||
int virFileLock(int fd G_GNUC_UNUSED,
|
||||
bool shared G_GNUC_UNUSED,
|
||||
off_t start G_GNUC_UNUSED,
|
||||
off_t len G_GNUC_UNUSED,
|
||||
bool waitForLock G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int virFileUnlock(int fd ATTRIBUTE_UNUSED,
|
||||
off_t start ATTRIBUTE_UNUSED,
|
||||
off_t len ATTRIBUTE_UNUSED)
|
||||
int virFileUnlock(int fd G_GNUC_UNUSED,
|
||||
off_t start G_GNUC_UNUSED,
|
||||
off_t len G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ testParseFormatVU(const void *opaque)
|
||||
|
||||
|
||||
static int
|
||||
testVUPrecedence(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVUPrecedence(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_AUTOFREE(char *) fakehome = NULL;
|
||||
VIR_AUTOSTRINGLIST vuList = NULL;
|
||||
|
@ -111,17 +111,17 @@ virTPMCreateCancelPath(const char *devpath)
|
||||
* variables that support it.
|
||||
*/
|
||||
unsigned long long
|
||||
virMemoryMaxValue(bool capped ATTRIBUTE_UNUSED)
|
||||
virMemoryMaxValue(bool capped G_GNUC_UNUSED)
|
||||
{
|
||||
return LLONG_MAX;
|
||||
}
|
||||
|
||||
char *
|
||||
virSCSIDeviceGetSgName(const char *sysfs_prefix ATTRIBUTE_UNUSED,
|
||||
const char *adapter ATTRIBUTE_UNUSED,
|
||||
unsigned int bus ATTRIBUTE_UNUSED,
|
||||
unsigned int target ATTRIBUTE_UNUSED,
|
||||
unsigned long long unit ATTRIBUTE_UNUSED)
|
||||
virSCSIDeviceGetSgName(const char *sysfs_prefix G_GNUC_UNUSED,
|
||||
const char *adapter G_GNUC_UNUSED,
|
||||
unsigned int bus G_GNUC_UNUSED,
|
||||
unsigned int target G_GNUC_UNUSED,
|
||||
unsigned long long unit G_GNUC_UNUSED)
|
||||
{
|
||||
char *ret;
|
||||
|
||||
@ -139,10 +139,10 @@ virSCSIVHostOpenVhostSCSI(int *vhostfd)
|
||||
|
||||
int
|
||||
virNetDevTapCreate(char **ifname,
|
||||
const char *tunpath ATTRIBUTE_UNUSED,
|
||||
const char *tunpath G_GNUC_UNUSED,
|
||||
int *tapfd,
|
||||
size_t tapfdSize,
|
||||
unsigned int flags ATTRIBUTE_UNUSED)
|
||||
unsigned int flags G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@ -158,8 +158,8 @@ virNetDevTapCreate(char **ifname,
|
||||
}
|
||||
|
||||
int
|
||||
virNetDevSetMAC(const char *ifname ATTRIBUTE_UNUSED,
|
||||
const virMacAddr *macaddr ATTRIBUTE_UNUSED)
|
||||
virNetDevSetMAC(const char *ifname G_GNUC_UNUSED,
|
||||
const virMacAddr *macaddr G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -172,24 +172,24 @@ virNetDevExists(const char *ifname)
|
||||
}
|
||||
|
||||
|
||||
int virNetDevIPAddrAdd(const char *ifname ATTRIBUTE_UNUSED,
|
||||
virSocketAddr *addr ATTRIBUTE_UNUSED,
|
||||
virSocketAddr *peer ATTRIBUTE_UNUSED,
|
||||
unsigned int prefix ATTRIBUTE_UNUSED)
|
||||
int virNetDevIPAddrAdd(const char *ifname G_GNUC_UNUSED,
|
||||
virSocketAddr *addr G_GNUC_UNUSED,
|
||||
virSocketAddr *peer G_GNUC_UNUSED,
|
||||
unsigned int prefix G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
virNetDevSetOnline(const char *ifname ATTRIBUTE_UNUSED,
|
||||
bool online ATTRIBUTE_UNUSED)
|
||||
virNetDevSetOnline(const char *ifname G_GNUC_UNUSED,
|
||||
bool online G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
virNetDevRunEthernetScript(const char *ifname ATTRIBUTE_UNUSED,
|
||||
const char *script ATTRIBUTE_UNUSED)
|
||||
virNetDevRunEthernetScript(const char *ifname G_GNUC_UNUSED,
|
||||
const char *script G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -226,14 +226,14 @@ virCommandPassFD(virCommandPtr cmd,
|
||||
}
|
||||
|
||||
int
|
||||
virNetDevOpenvswitchGetVhostuserIfname(const char *path ATTRIBUTE_UNUSED,
|
||||
virNetDevOpenvswitchGetVhostuserIfname(const char *path G_GNUC_UNUSED,
|
||||
char **ifname)
|
||||
{
|
||||
return VIR_STRDUP(*ifname, "vhost-user0");
|
||||
}
|
||||
|
||||
int
|
||||
qemuInterfaceOpenVhostNet(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
qemuInterfaceOpenVhostNet(virDomainDefPtr def G_GNUC_UNUSED,
|
||||
virDomainNetDefPtr net,
|
||||
int *vhostfd,
|
||||
size_t *vhostfdSize)
|
||||
@ -252,7 +252,7 @@ qemuInterfaceOpenVhostNet(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
int
|
||||
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev ATTRIBUTE_UNUSED)
|
||||
qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev G_GNUC_UNUSED)
|
||||
|
||||
{
|
||||
/* We need to return an FD number for a UNIX listener socket,
|
||||
@ -269,8 +269,8 @@ qemuOpenChrChardevUNIXSocket(const virDomainChrSourceDef *dev ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
int
|
||||
qemuBuildTPMOpenBackendFDs(const char *tpmdev ATTRIBUTE_UNUSED,
|
||||
const char *cancel_path ATTRIBUTE_UNUSED,
|
||||
qemuBuildTPMOpenBackendFDs(const char *tpmdev G_GNUC_UNUSED,
|
||||
const char *cancel_path G_GNUC_UNUSED,
|
||||
int *tpmfd,
|
||||
int *cancelfd)
|
||||
{
|
||||
|
@ -37,10 +37,10 @@
|
||||
static virQEMUDriver driver;
|
||||
|
||||
static unsigned char *
|
||||
fakeSecretGetValue(virSecretPtr obj ATTRIBUTE_UNUSED,
|
||||
fakeSecretGetValue(virSecretPtr obj G_GNUC_UNUSED,
|
||||
size_t *value_size,
|
||||
unsigned int fakeflags ATTRIBUTE_UNUSED,
|
||||
unsigned int internalFlags ATTRIBUTE_UNUSED)
|
||||
unsigned int fakeflags G_GNUC_UNUSED,
|
||||
unsigned int internalFlags G_GNUC_UNUSED)
|
||||
{
|
||||
char *secret;
|
||||
if (VIR_STRDUP(secret, "AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A") < 0)
|
||||
@ -199,7 +199,7 @@ fakeStorageVolGetPath(virStorageVolPtr vol)
|
||||
|
||||
static char *
|
||||
fakeStoragePoolGetXMLDesc(virStoragePoolPtr pool,
|
||||
unsigned int flags_unused ATTRIBUTE_UNUSED)
|
||||
unsigned int flags_unused G_GNUC_UNUSED)
|
||||
{
|
||||
char *xmlpath = NULL;
|
||||
char *xmlbuf = NULL;
|
||||
@ -278,7 +278,7 @@ fakeNWFilterBindingLookupByPortDev(virConnectPtr conn,
|
||||
|
||||
|
||||
static int
|
||||
fakeNWFilterBindingDelete(virNWFilterBindingPtr binding ATTRIBUTE_UNUSED)
|
||||
fakeNWFilterBindingDelete(virNWFilterBindingPtr binding G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -168,7 +168,7 @@ init_scsihost_sysfs(const char *fakesysfsdir)
|
||||
|
||||
/* Test virReadSCSIUniqueId */
|
||||
static int
|
||||
testVirReadSCSIUniqueId(const void *data ATTRIBUTE_UNUSED)
|
||||
testVirReadSCSIUniqueId(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int hostnum, unique_id;
|
||||
|
||||
@ -198,7 +198,7 @@ testVirReadSCSIUniqueId(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Test virSCSIHostFindByPCI */
|
||||
static int
|
||||
testVirFindSCSIHostByPCI(const void *data ATTRIBUTE_UNUSED)
|
||||
testVirFindSCSIHostByPCI(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned int unique_id1 = 1;
|
||||
unsigned int unique_id2 = 2;
|
||||
|
@ -106,7 +106,7 @@ testSELinuxCheckCon(context_t con,
|
||||
const char *role,
|
||||
const char *type,
|
||||
int sensMin,
|
||||
int sensMax ATTRIBUTE_UNUSED,
|
||||
int sensMax G_GNUC_UNUSED,
|
||||
int catMin,
|
||||
int catMax)
|
||||
{
|
||||
|
@ -30,8 +30,8 @@
|
||||
|
||||
#include "internal.h"
|
||||
|
||||
static void shunloadError(void *userData ATTRIBUTE_UNUSED,
|
||||
virErrorPtr error ATTRIBUTE_UNUSED)
|
||||
static void shunloadError(void *userData G_GNUC_UNUSED,
|
||||
virErrorPtr error G_GNUC_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ static void sigHandler(int sig)
|
||||
* we don't want 'shunloadtest' itself to link against
|
||||
* libvirt.so. We need to test dlopen()'ing of libvirt.so
|
||||
*/
|
||||
int main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
int main(int argc G_GNUC_UNUSED, char **argv)
|
||||
{
|
||||
void (*startup)(void);
|
||||
pthread_t t;
|
||||
|
@ -380,9 +380,9 @@ virTestCaptureProgramOutput(const char *const argv[], char **buf, int maxlen)
|
||||
}
|
||||
#else /* !WIN32 */
|
||||
int
|
||||
virTestCaptureProgramOutput(const char *const argv[] ATTRIBUTE_UNUSED,
|
||||
char **buf ATTRIBUTE_UNUSED,
|
||||
int maxlen ATTRIBUTE_UNUSED)
|
||||
virTestCaptureProgramOutput(const char *const argv[] G_GNUC_UNUSED,
|
||||
char **buf G_GNUC_UNUSED,
|
||||
int maxlen G_GNUC_UNUSED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -713,8 +713,8 @@ virTestCompareToString(const char *expect,
|
||||
}
|
||||
|
||||
static void
|
||||
virTestErrorFuncQuiet(void *data ATTRIBUTE_UNUSED,
|
||||
virErrorPtr err ATTRIBUTE_UNUSED)
|
||||
virTestErrorFuncQuiet(void *data G_GNUC_UNUSED,
|
||||
virErrorPtr err G_GNUC_UNUSED)
|
||||
{ }
|
||||
|
||||
|
||||
@ -733,15 +733,15 @@ struct virtTestLogData {
|
||||
static struct virtTestLogData testLog = { VIR_BUFFER_INITIALIZER };
|
||||
|
||||
static void
|
||||
virtTestLogOutput(virLogSourcePtr source ATTRIBUTE_UNUSED,
|
||||
virLogPriority priority ATTRIBUTE_UNUSED,
|
||||
const char *filename ATTRIBUTE_UNUSED,
|
||||
int lineno ATTRIBUTE_UNUSED,
|
||||
const char *funcname ATTRIBUTE_UNUSED,
|
||||
virtTestLogOutput(virLogSourcePtr source G_GNUC_UNUSED,
|
||||
virLogPriority priority G_GNUC_UNUSED,
|
||||
const char *filename G_GNUC_UNUSED,
|
||||
int lineno G_GNUC_UNUSED,
|
||||
const char *funcname G_GNUC_UNUSED,
|
||||
const char *timestamp,
|
||||
virLogMetadataPtr metadata ATTRIBUTE_UNUSED,
|
||||
virLogMetadataPtr metadata G_GNUC_UNUSED,
|
||||
unsigned int flags,
|
||||
const char *rawstr ATTRIBUTE_UNUSED,
|
||||
const char *rawstr G_GNUC_UNUSED,
|
||||
const char *str,
|
||||
void *data)
|
||||
{
|
||||
|
@ -157,7 +157,7 @@ testQEMUSchemaValidateObjectMember(const char *key,
|
||||
|
||||
|
||||
static int
|
||||
testQEMUSchemaValidateObjectMergeVariantMember(size_t pos ATTRIBUTE_UNUSED,
|
||||
testQEMUSchemaValidateObjectMergeVariantMember(size_t pos G_GNUC_UNUSED,
|
||||
virJSONValuePtr item,
|
||||
void *opaque)
|
||||
{
|
||||
@ -245,9 +245,9 @@ testQEMUSchemaValidateObjectMergeVariant(virJSONValuePtr root,
|
||||
|
||||
|
||||
static int
|
||||
testQEMUSchemaValidateObjectMandatoryMember(size_t pos ATTRIBUTE_UNUSED,
|
||||
testQEMUSchemaValidateObjectMandatoryMember(size_t pos G_GNUC_UNUSED,
|
||||
virJSONValuePtr item,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
struct testQEMUSchemaValidateObjectMemberData *data = opaque;
|
||||
|
||||
|
@ -39,7 +39,7 @@ static const char* diskNamesInvalid[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testIndexToDiskName(const void *data ATTRIBUTE_UNUSED)
|
||||
testIndexToDiskName(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
char *diskName = NULL;
|
||||
@ -65,7 +65,7 @@ testIndexToDiskName(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testDiskNameToIndex(const void *data ATTRIBUTE_UNUSED)
|
||||
testDiskNameToIndex(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
int idx;
|
||||
@ -95,7 +95,7 @@ testDiskNameToIndex(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testDiskNameParse(const void *data ATTRIBUTE_UNUSED)
|
||||
testDiskNameParse(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
int idx;
|
||||
@ -155,7 +155,7 @@ static struct testVersionString versions[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testParseVersionString(const void *data ATTRIBUTE_UNUSED)
|
||||
testParseVersionString(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int result;
|
||||
size_t i;
|
||||
@ -205,7 +205,7 @@ static struct testRoundData roundData[] = {
|
||||
};
|
||||
|
||||
static int
|
||||
testRoundValueToPowerOfTwo(const void *data ATTRIBUTE_UNUSED)
|
||||
testRoundValueToPowerOfTwo(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned int result;
|
||||
size_t i;
|
||||
@ -234,7 +234,7 @@ testRoundValueToPowerOfTwo(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testOverflowCheckMacro(const void *data ATTRIBUTE_UNUSED)
|
||||
testOverflowCheckMacro(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
long long tmp;
|
||||
uint8_t luchar;
|
||||
|
@ -44,7 +44,7 @@ testCheckNonNull(void *t)
|
||||
}
|
||||
|
||||
static int
|
||||
testAllocScalar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testAllocScalar(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
testDummyStruct *t;
|
||||
int ret = -1;
|
||||
@ -76,7 +76,7 @@ testAllocScalar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testAllocArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testAllocArray(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
testDummyStruct *t;
|
||||
size_t nt = 10, i;
|
||||
@ -111,7 +111,7 @@ testAllocArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testReallocArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testReallocArray(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
testDummyStruct *t;
|
||||
size_t nt = 10, i;
|
||||
@ -185,7 +185,7 @@ testReallocArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testExpandArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testExpandArray(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
testDummyStruct *t;
|
||||
size_t nt = 10, i;
|
||||
@ -265,7 +265,7 @@ testExpandArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testResizeArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testResizeArray(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
testDummyStruct *t;
|
||||
size_t nt = 10, at, i;
|
||||
@ -326,7 +326,7 @@ testResizeArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testInsertArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testInsertArray(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
testDummyStruct **t;
|
||||
size_t nt = 10, i;
|
||||
@ -384,7 +384,7 @@ testInsertArray(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testDispose(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testDispose(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int *num = NULL;
|
||||
int *nums = NULL;
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "virthread.h"
|
||||
|
||||
static int
|
||||
testTypes(const void *data ATTRIBUTE_UNUSED)
|
||||
testTypes(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned int u, u2;
|
||||
int s, s2;
|
||||
@ -131,7 +131,7 @@ thread_func(void *data)
|
||||
}
|
||||
|
||||
static int
|
||||
testThreads(const void *data ATTRIBUTE_UNUSED)
|
||||
testThreads(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int sum;
|
||||
size_t i;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "virbitmap.h"
|
||||
|
||||
static int
|
||||
test1(const void *data ATTRIBUTE_UNUSED)
|
||||
test1(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr bitmap;
|
||||
int size;
|
||||
@ -82,7 +82,7 @@ testBit(virBitmapPtr bitmap,
|
||||
}
|
||||
|
||||
static int
|
||||
test2(const void *data ATTRIBUTE_UNUSED)
|
||||
test2(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *bitsString1 = "1-32,50,88-99,1021-1023";
|
||||
char *bitsString2 = NULL;
|
||||
@ -145,7 +145,7 @@ test2(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
test3(const void *data ATTRIBUTE_UNUSED)
|
||||
test3(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr bitmap = NULL;
|
||||
int ret = -1;
|
||||
@ -173,7 +173,7 @@ test3(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* test for virBitmapNextSetBit, virBitmapLastSetBit, virBitmapNextClearBit */
|
||||
static int
|
||||
test4(const void *data ATTRIBUTE_UNUSED)
|
||||
test4(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *bitsString = "0, 2-4, 6-10, 12, 14-18, 20, 22, 25";
|
||||
int size = 40;
|
||||
@ -296,7 +296,7 @@ test4(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
/* test for virBitmapNewData/ToData/DataFormat */
|
||||
static int
|
||||
test5(const void *v ATTRIBUTE_UNUSED)
|
||||
test5(const void *v G_GNUC_UNUSED)
|
||||
{
|
||||
char data[] = {0x01, 0x02, 0x00, 0x00, 0x04};
|
||||
unsigned char *data2 = NULL;
|
||||
@ -357,7 +357,7 @@ test5(const void *v ATTRIBUTE_UNUSED)
|
||||
|
||||
/* test for virBitmapFormat */
|
||||
static int
|
||||
test6(const void *v ATTRIBUTE_UNUSED)
|
||||
test6(const void *v G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr bitmap = NULL;
|
||||
char *str = NULL;
|
||||
@ -439,7 +439,7 @@ test6(const void *v ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
test7(const void *v ATTRIBUTE_UNUSED)
|
||||
test7(const void *v G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr bitmap;
|
||||
size_t i;
|
||||
@ -479,7 +479,7 @@ test7(const void *v ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
test8(const void *v ATTRIBUTE_UNUSED)
|
||||
test8(const void *v G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr bitmap = NULL;
|
||||
char data[108] = {0x00,};
|
||||
@ -507,7 +507,7 @@ test8(const void *v ATTRIBUTE_UNUSED)
|
||||
|
||||
/* test out of bounds conditions on virBitmapParse */
|
||||
static int
|
||||
test9(const void *opaque ATTRIBUTE_UNUSED)
|
||||
test9(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virBitmapPtr bitmap = NULL;
|
||||
@ -538,7 +538,7 @@ test9(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
test10(const void *opaque ATTRIBUTE_UNUSED)
|
||||
test10(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virBitmapPtr b1 = NULL, b2 = NULL, b3 = NULL, b4 = NULL;
|
||||
@ -630,7 +630,7 @@ test11(const void *opaque)
|
||||
|
||||
/* test self-expanding bitmap APIs */
|
||||
static int
|
||||
test12(const void *opaque ATTRIBUTE_UNUSED)
|
||||
test12(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr map = NULL;
|
||||
int ret = -1;
|
||||
@ -672,7 +672,7 @@ test12(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
/* virBitmap(New/To)String */
|
||||
static int
|
||||
test13(const void *opaque ATTRIBUTE_UNUSED)
|
||||
test13(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBitmapPtr map = NULL;
|
||||
const char *strings[] = { "1234feebee", "000c0fefe" };
|
||||
|
@ -52,7 +52,7 @@ static int testBufInfiniteLoop(const void *data)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testBufAutoIndent(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testBufAutoIndent(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer bufinit = VIR_BUFFER_INITIALIZER;
|
||||
virBufferPtr buf = &bufinit;
|
||||
@ -144,7 +144,7 @@ static int testBufAutoIndent(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testBufTrim(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testBufTrim(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer bufinit = VIR_BUFFER_INITIALIZER;
|
||||
virBufferPtr buf = NULL;
|
||||
@ -192,7 +192,7 @@ static int testBufTrim(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testBufAddBuffer(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testBufAddBuffer(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf1 = VIR_BUFFER_INITIALIZER;
|
||||
virBuffer buf2 = VIR_BUFFER_INITIALIZER;
|
||||
@ -304,7 +304,7 @@ static int testBufAddBuffer(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testBufAddBuffer2(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testBufAddBuffer2(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_AUTOCLEAN(virBuffer) buf1 = VIR_BUFFER_INITIALIZER;
|
||||
VIR_AUTOCLEAN(virBuffer) buf2 = VIR_BUFFER_INITIALIZER;
|
||||
@ -335,7 +335,7 @@ struct testBufAddStrData {
|
||||
};
|
||||
|
||||
static int
|
||||
testBufAddStr(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testBufAddStr(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const struct testBufAddStrData *data = opaque;
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
@ -368,7 +368,7 @@ testBufAddStr(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testBufEscapeStr(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testBufEscapeStr(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const struct testBufAddStrData *data = opaque;
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
@ -430,7 +430,7 @@ testBufEscapeRegex(const void *opaque)
|
||||
|
||||
|
||||
static int
|
||||
testBufSetIndent(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testBufSetIndent(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||
char *actual;
|
||||
@ -459,7 +459,7 @@ testBufSetIndent(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Result of this shows up only in valgrind or similar */
|
||||
static int
|
||||
testBufferAutoclean(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testBufferAutoclean(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_AUTOCLEAN(virBuffer) buf = VIR_BUFFER_INITIALIZER;
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
|
||||
static int
|
||||
test_virCapabilitiesGetCpusForNodemask(const void *data ATTRIBUTE_UNUSED)
|
||||
test_virCapabilitiesGetCpusForNodemask(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *nodestr = "3,4,5,6";
|
||||
virBitmapPtr nodemask = NULL;
|
||||
@ -63,7 +63,7 @@ test_virCapabilitiesGetCpusForNodemask(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static bool ATTRIBUTE_UNUSED
|
||||
static bool G_GNUC_UNUSED
|
||||
doCapsExpectFailure(virCapsPtr caps,
|
||||
int ostype,
|
||||
virArch arch,
|
||||
@ -82,7 +82,7 @@ doCapsExpectFailure(virCapsPtr caps,
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool ATTRIBUTE_UNUSED
|
||||
static bool G_GNUC_UNUSED
|
||||
doCapsCompare(virCapsPtr caps,
|
||||
int ostype,
|
||||
virArch arch,
|
||||
@ -153,7 +153,7 @@ doCapsCompare(virCapsPtr caps,
|
||||
|
||||
#ifdef WITH_QEMU
|
||||
static int
|
||||
test_virCapsDomainDataLookupQEMU(const void *data ATTRIBUTE_UNUSED)
|
||||
test_virCapsDomainDataLookupQEMU(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
virCapsPtr caps = NULL;
|
||||
@ -212,7 +212,7 @@ test_virCapsDomainDataLookupQEMU(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
#ifdef WITH_LXC
|
||||
static int
|
||||
test_virCapsDomainDataLookupLXC(const void *data ATTRIBUTE_UNUSED)
|
||||
test_virCapsDomainDataLookupLXC(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
virCapsPtr caps = NULL;
|
||||
|
@ -228,7 +228,7 @@ testCgroupDetectMounts(const void *args)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupNewForSelf(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForSelf(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -268,7 +268,7 @@ static int testCgroupNewForSelf(const void *args ATTRIBUTE_UNUSED)
|
||||
/* Asking for impossible combination since CPU is co-mounted */
|
||||
|
||||
|
||||
static int testCgroupNewForPartition(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForPartition(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -342,7 +342,7 @@ static int testCgroupNewForPartition(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupNewForPartitionNested(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForPartitionNested(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -392,7 +392,7 @@ static int testCgroupNewForPartitionNested(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupNewForPartitionNestedDeep(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForPartitionNestedDeep(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -449,7 +449,7 @@ static int testCgroupNewForPartitionNestedDeep(const void *args ATTRIBUTE_UNUSED
|
||||
|
||||
|
||||
|
||||
static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForPartitionDomain(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr partitioncgroup = NULL;
|
||||
virCgroupPtr domaincgroup = NULL;
|
||||
@ -484,7 +484,7 @@ static int testCgroupNewForPartitionDomain(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testCgroupNewForPartitionDomainEscaped(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForPartitionDomainEscaped(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr partitioncgroup1 = NULL;
|
||||
virCgroupPtr partitioncgroup2 = NULL;
|
||||
@ -537,7 +537,7 @@ static int testCgroupNewForPartitionDomainEscaped(const void *args ATTRIBUTE_UNU
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testCgroupNewForSelfAllInOne(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForSelfAllInOne(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -564,7 +564,7 @@ static int testCgroupNewForSelfAllInOne(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupNewForSelfLogind(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForSelfLogind(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
|
||||
@ -578,7 +578,7 @@ static int testCgroupNewForSelfLogind(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupNewForSelfUnified(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForSelfUnified(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -602,7 +602,7 @@ static int testCgroupNewForSelfUnified(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupNewForSelfHybrid(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupNewForSelfHybrid(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int ret = -1;
|
||||
@ -655,7 +655,7 @@ static int testCgroupAvailable(const void *args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testCgroupControllerAvailable(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupControllerAvailable(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -683,7 +683,7 @@ static int testCgroupControllerAvailable(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testCgroupGetPercpuStats(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupGetPercpuStats(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
size_t i;
|
||||
@ -768,7 +768,7 @@ static int testCgroupGetPercpuStats(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupGetMemoryUsage(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int rv, ret = -1;
|
||||
@ -802,7 +802,7 @@ static int testCgroupGetMemoryUsage(const void *args ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testCgroupGetMemoryStat(const void *args ATTRIBUTE_UNUSED)
|
||||
testCgroupGetMemoryStat(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
int rv;
|
||||
@ -861,7 +861,7 @@ testCgroupGetMemoryStat(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCgroupGetBlkioIoServiced(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupGetBlkioIoServiced(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
size_t i;
|
||||
@ -911,7 +911,7 @@ static int testCgroupGetBlkioIoServiced(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testCgroupGetBlkioIoDeviceServiced(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testCgroupGetBlkioIoDeviceServiced(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virCgroupPtr cgroup = NULL;
|
||||
size_t i;
|
||||
|
@ -72,7 +72,7 @@ static int testConfRoundTrip(const void *opaque)
|
||||
}
|
||||
|
||||
|
||||
static int testConfMemoryNoNewline(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testConfMemoryNoNewline(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *srcdata = \
|
||||
"ullong = '123456789'\n" \
|
||||
@ -137,7 +137,7 @@ static int testConfMemoryNoNewline(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testConfParseInt(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testConfParseInt(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *srcdata = \
|
||||
"int = -1729\n" \
|
||||
@ -285,7 +285,7 @@ static int testConfParseInt(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testConfParseBool(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testConfParseBool(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *srcdata = \
|
||||
"false = 0\n" \
|
||||
@ -346,7 +346,7 @@ static int testConfParseBool(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testConfParseString(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testConfParseString(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *srcdata = \
|
||||
"int = 6963472309248\n" \
|
||||
@ -385,7 +385,7 @@ static int testConfParseString(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testConfParseStringList(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testConfParseStringList(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *srcdata = \
|
||||
"string_list = [\"foo\", \"bar\"]\n" \
|
||||
|
@ -47,7 +47,7 @@ VIR_LOG_INIT("tests.dbustest");
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
static int testMessageSimple(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageSimple(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -123,7 +123,7 @@ static int testMessageSimple(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testMessageVariant(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageVariant(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -172,7 +172,7 @@ static int testMessageVariant(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageArray(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageArray(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -231,7 +231,7 @@ static int testMessageArray(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageEmptyArrayRef(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageEmptyArrayRef(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -275,7 +275,7 @@ static int testMessageEmptyArrayRef(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageSingleArrayRef(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageSingleArrayRef(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -325,7 +325,7 @@ static int testMessageSingleArrayRef(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageArrayRef(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageArrayRef(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -438,7 +438,7 @@ static int testMessageArrayRef(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageStruct(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageStruct(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -514,7 +514,7 @@ static int testMessageStruct(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testMessageDict(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageDict(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -583,7 +583,7 @@ static int testMessageDict(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageDictRef(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageDictRef(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
@ -654,7 +654,7 @@ static int testMessageDictRef(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageEmptyDictRef(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageEmptyDictRef(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
DBusMessage *msg = NULL;
|
||||
int ret = -1;
|
||||
|
@ -23,7 +23,7 @@
|
||||
uint32_t
|
||||
virHashCodeGen(const void *key,
|
||||
size_t len,
|
||||
uint32_t seed ATTRIBUTE_UNUSED)
|
||||
uint32_t seed G_GNUC_UNUSED)
|
||||
{
|
||||
const uint8_t *k = key;
|
||||
uint32_t h = 0;
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "virendian.h"
|
||||
|
||||
static int
|
||||
test1(const void *data ATTRIBUTE_UNUSED)
|
||||
test1(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
/* Regular char should work, even if signed, and even with
|
||||
* unaligned access. */
|
||||
@ -65,7 +65,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
test2(const void *data ATTRIBUTE_UNUSED)
|
||||
test2(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
/* Unsigned char should work without cast, even if unaligned access. */
|
||||
unsigned char array[] = { 1, 2, 3, 4, 5, 6, 7, 8,
|
||||
|
@ -53,7 +53,7 @@ virErrorTestMsgFormatInfoOne(const char *msg)
|
||||
|
||||
|
||||
static int
|
||||
virErrorTestMsgs(const void *opaque ATTRIBUTE_UNUSED)
|
||||
virErrorTestMsgs(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *err_noinfo;
|
||||
const char *err_info;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
int
|
||||
unlink(const char *path ATTRIBUTE_UNUSED)
|
||||
unlink(const char *path G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ testFileCacheIsValid(void *data,
|
||||
|
||||
|
||||
static void *
|
||||
testFileCacheNewData(const char *name ATTRIBUTE_UNUSED,
|
||||
testFileCacheNewData(const char *name G_GNUC_UNUSED,
|
||||
void *priv)
|
||||
{
|
||||
testFileCachePrivPtr testPriv = priv;
|
||||
@ -114,8 +114,8 @@ testFileCacheNewData(const char *name ATTRIBUTE_UNUSED,
|
||||
|
||||
static void *
|
||||
testFileCacheLoadFile(const char *filename,
|
||||
const char *name ATTRIBUTE_UNUSED,
|
||||
void *priv ATTRIBUTE_UNUSED)
|
||||
const char *name G_GNUC_UNUSED,
|
||||
void *priv G_GNUC_UNUSED)
|
||||
{
|
||||
testFileCacheObjPtr obj;
|
||||
char *data;
|
||||
@ -131,8 +131,8 @@ testFileCacheLoadFile(const char *filename,
|
||||
|
||||
|
||||
static int
|
||||
testFileCacheSaveFile(void *data ATTRIBUTE_UNUSED,
|
||||
const char *filename ATTRIBUTE_UNUSED,
|
||||
testFileCacheSaveFile(void *data G_GNUC_UNUSED,
|
||||
const char *filename G_GNUC_UNUSED,
|
||||
void *priv)
|
||||
{
|
||||
testFileCachePrivPtr testPriv = priv;
|
||||
|
@ -236,8 +236,8 @@ holesSupported(void)
|
||||
#else /* !HAVE_DECL_SEEK_HOLE || !defined(__linux__)*/
|
||||
|
||||
static int
|
||||
makeSparseFile(const off_t offsets[] ATTRIBUTE_UNUSED,
|
||||
const bool startData ATTRIBUTE_UNUSED)
|
||||
makeSparseFile(const off_t offsets[] G_GNUC_UNUSED,
|
||||
const bool startData G_GNUC_UNUSED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -315,7 +315,7 @@ struct testFileIsSharedFSType {
|
||||
};
|
||||
|
||||
static int
|
||||
testFileIsSharedFSType(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFileIsSharedFSType(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
#ifndef __linux__
|
||||
return EXIT_AM_SKIP;
|
||||
|
@ -322,7 +322,7 @@ testFirewallRemoveRule(const void *opaque)
|
||||
|
||||
|
||||
static int
|
||||
testFirewallManyGroups(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallManyGroups(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -395,12 +395,12 @@ testFirewallManyGroups(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
static void
|
||||
testFirewallRollbackHook(const char *const*args,
|
||||
const char *const*env ATTRIBUTE_UNUSED,
|
||||
const char *input ATTRIBUTE_UNUSED,
|
||||
char **output ATTRIBUTE_UNUSED,
|
||||
char **error ATTRIBUTE_UNUSED,
|
||||
const char *const*env G_GNUC_UNUSED,
|
||||
const char *input G_GNUC_UNUSED,
|
||||
char **output G_GNUC_UNUSED,
|
||||
char **error G_GNUC_UNUSED,
|
||||
int *status,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
bool isAdd = false;
|
||||
while (*args) {
|
||||
@ -416,7 +416,7 @@ testFirewallRollbackHook(const char *const*args,
|
||||
}
|
||||
|
||||
static int
|
||||
testFirewallIgnoreFailGroup(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallIgnoreFailGroup(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -491,7 +491,7 @@ testFirewallIgnoreFailGroup(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testFirewallIgnoreFailRule(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallIgnoreFailRule(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -565,7 +565,7 @@ testFirewallIgnoreFailRule(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testFirewallNoRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallNoRollback(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -632,7 +632,7 @@ testFirewallNoRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testFirewallSingleRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallSingleRollback(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -719,7 +719,7 @@ testFirewallSingleRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testFirewallManyRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallManyRollback(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -809,7 +809,7 @@ testFirewallManyRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testFirewallChainedRollback(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallChainedRollback(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
@ -957,12 +957,12 @@ static bool expectedLineError;
|
||||
|
||||
static void
|
||||
testFirewallQueryHook(const char *const*args,
|
||||
const char *const*env ATTRIBUTE_UNUSED,
|
||||
const char *input ATTRIBUTE_UNUSED,
|
||||
const char *const*env G_GNUC_UNUSED,
|
||||
const char *input G_GNUC_UNUSED,
|
||||
char **output,
|
||||
char **error ATTRIBUTE_UNUSED,
|
||||
char **error G_GNUC_UNUSED,
|
||||
int *status,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (STREQ(args[0], IPTABLES_PATH) &&
|
||||
STREQ(args[1], "-L")) {
|
||||
@ -982,7 +982,7 @@ static int
|
||||
testFirewallQueryCallback(virFirewallPtr fw,
|
||||
virFirewallLayer layer,
|
||||
const char *const *lines,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
virFirewallAddRule(fw, layer,
|
||||
@ -1008,7 +1008,7 @@ testFirewallQueryCallback(virFirewallPtr fw,
|
||||
}
|
||||
|
||||
static int
|
||||
testFirewallQuery(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testFirewallQuery(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virBuffer cmdbuf = VIR_BUFFER_INITIALIZER;
|
||||
virFirewallPtr fw = NULL;
|
||||
|
@ -51,9 +51,9 @@ testHashInit(int size)
|
||||
}
|
||||
|
||||
static int
|
||||
testHashCheckForEachCount(void *payload ATTRIBUTE_UNUSED,
|
||||
const void *name ATTRIBUTE_UNUSED,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
testHashCheckForEachCount(void *payload G_GNUC_UNUSED,
|
||||
const void *name G_GNUC_UNUSED,
|
||||
void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t *count = data;
|
||||
*count += 1;
|
||||
@ -110,7 +110,7 @@ testHashGrow(const void *data)
|
||||
|
||||
|
||||
static int
|
||||
testHashUpdate(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashUpdate(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int count = ARRAY_CARDINALITY(uuids) + ARRAY_CARDINALITY(uuids_new);
|
||||
virHashTablePtr hash;
|
||||
@ -148,7 +148,7 @@ testHashUpdate(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testHashRemove(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashRemove(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int count = ARRAY_CARDINALITY(uuids) - ARRAY_CARDINALITY(uuids_subset);
|
||||
virHashTablePtr hash;
|
||||
@ -181,7 +181,7 @@ const int testHashCountRemoveForEachSome =
|
||||
ARRAY_CARDINALITY(uuids) - ARRAY_CARDINALITY(uuids_subset);
|
||||
|
||||
static int
|
||||
testHashRemoveForEachSome(void *payload ATTRIBUTE_UNUSED,
|
||||
testHashRemoveForEachSome(void *payload G_GNUC_UNUSED,
|
||||
const void *name,
|
||||
void *data)
|
||||
{
|
||||
@ -204,7 +204,7 @@ testHashRemoveForEachSome(void *payload ATTRIBUTE_UNUSED,
|
||||
const int testHashCountRemoveForEachAll = 0;
|
||||
|
||||
static int
|
||||
testHashRemoveForEachAll(void *payload ATTRIBUTE_UNUSED,
|
||||
testHashRemoveForEachAll(void *payload G_GNUC_UNUSED,
|
||||
const void *name,
|
||||
void *data)
|
||||
{
|
||||
@ -242,7 +242,7 @@ testHashRemoveForEach(const void *data)
|
||||
|
||||
|
||||
static int
|
||||
testHashSteal(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashSteal(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int count = ARRAY_CARDINALITY(uuids) - ARRAY_CARDINALITY(uuids_subset);
|
||||
virHashTablePtr hash;
|
||||
@ -272,7 +272,7 @@ testHashSteal(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testHashRemoveSetIter(const void *payload ATTRIBUTE_UNUSED,
|
||||
testHashRemoveSetIter(const void *payload G_GNUC_UNUSED,
|
||||
const void *name,
|
||||
const void *data)
|
||||
{
|
||||
@ -296,7 +296,7 @@ testHashRemoveSetIter(const void *payload ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static int
|
||||
testHashRemoveSet(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashRemoveSet(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virHashTablePtr hash;
|
||||
int count = 0;
|
||||
@ -332,15 +332,15 @@ testHashRemoveSet(const void *data ATTRIBUTE_UNUSED)
|
||||
const int testSearchIndex = ARRAY_CARDINALITY(uuids_subset) / 2;
|
||||
|
||||
static int
|
||||
testHashSearchIter(const void *payload ATTRIBUTE_UNUSED,
|
||||
testHashSearchIter(const void *payload G_GNUC_UNUSED,
|
||||
const void *name,
|
||||
const void *data ATTRIBUTE_UNUSED)
|
||||
const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
return STREQ(uuids_subset[testSearchIndex], name);
|
||||
}
|
||||
|
||||
static int
|
||||
testHashSearch(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashSearch(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virHashTablePtr hash;
|
||||
void *entry;
|
||||
@ -383,7 +383,7 @@ testHashGetItemsCompValue(const virHashKeyValuePair *a,
|
||||
}
|
||||
|
||||
static int
|
||||
testHashGetItems(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashGetItems(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virHashTablePtr hash;
|
||||
virHashKeyValuePairPtr array = NULL;
|
||||
@ -450,7 +450,7 @@ testHashEqualCompValue(const void *value1, const void *value2)
|
||||
}
|
||||
|
||||
static int
|
||||
testHashEqual(const void *data ATTRIBUTE_UNUSED)
|
||||
testHashEqual(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virHashTablePtr hash1, hash2 = NULL;
|
||||
int ret = -1;
|
||||
|
@ -390,7 +390,7 @@ testVirHostdevUpdateActivePCIHostdevs(void)
|
||||
* 2. Reattach devices to the host
|
||||
*/
|
||||
static int
|
||||
testVirHostdevRoundtripNoGuest(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirHostdevRoundtripNoGuest(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (testVirHostdevDetachPCINodeDevice() < 0)
|
||||
return -1;
|
||||
@ -412,7 +412,7 @@ testVirHostdevRoundtripNoGuest(const void *opaque ATTRIBUTE_UNUSED)
|
||||
* 4. Reattach devices to the host
|
||||
*/
|
||||
static int
|
||||
testVirHostdevRoundtripUnmanaged(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirHostdevRoundtripUnmanaged(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (testVirHostdevDetachPCINodeDevice() < 0)
|
||||
return -1;
|
||||
@ -436,7 +436,7 @@ testVirHostdevRoundtripUnmanaged(const void *opaque ATTRIBUTE_UNUSED)
|
||||
* 2. Detach devices from the guest as managed
|
||||
*/
|
||||
static int
|
||||
testVirHostdevRoundtripManaged(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirHostdevRoundtripManaged(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (testVirHostdevPreparePCIHostdevs_managed(false) < 0)
|
||||
return -1;
|
||||
@ -459,7 +459,7 @@ testVirHostdevRoundtripManaged(const void *opaque ATTRIBUTE_UNUSED)
|
||||
* 4. Reattach devices to the host
|
||||
*/
|
||||
static int
|
||||
testVirHostdevRoundtripMixed(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirHostdevRoundtripMixed(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (testVirHostdevDetachPCINodeDevice() < 0)
|
||||
return -1;
|
||||
@ -483,7 +483,7 @@ testVirHostdevRoundtripMixed(const void *opaque ATTRIBUTE_UNUSED)
|
||||
* 2. Update list of active devices
|
||||
*/
|
||||
static int
|
||||
testVirHostdevOther(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirHostdevOther(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (testVirHostdevResetPCINodeDevice() < 0)
|
||||
return -1;
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
VIR_LOG_INIT("tests.identitytest");
|
||||
|
||||
static int testIdentityAttrs(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testIdentityAttrs(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
g_autoptr(virIdentity) ident = virIdentityNew();
|
||||
const char *val;
|
||||
@ -117,7 +117,7 @@ static int testIdentityGetSystem(const void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testSetFakeSELinuxContext(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testSetFakeSELinuxContext(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
#if WITH_SELINUX
|
||||
return setcon_raw((security_context_t)data);
|
||||
@ -127,7 +127,7 @@ static int testSetFakeSELinuxContext(const void *data ATTRIBUTE_UNUSED)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int testDisableFakeSELinux(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testDisableFakeSELinux(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
#if WITH_SELINUX
|
||||
return security_disable();
|
||||
|
@ -73,10 +73,10 @@ struct testIscsiadmCbData {
|
||||
};
|
||||
|
||||
static void testIscsiadmCb(const char *const*args,
|
||||
const char *const*env ATTRIBUTE_UNUSED,
|
||||
const char *input ATTRIBUTE_UNUSED,
|
||||
const char *const*env G_GNUC_UNUSED,
|
||||
const char *input G_GNUC_UNUSED,
|
||||
char **output,
|
||||
char **error ATTRIBUTE_UNUSED,
|
||||
char **error G_GNUC_UNUSED,
|
||||
int *status,
|
||||
void *opaque)
|
||||
{
|
||||
|
@ -385,7 +385,7 @@ testJSONDeflatten(const void *data)
|
||||
|
||||
|
||||
static int
|
||||
testJSONEscapeObj(const void *data ATTRIBUTE_UNUSED)
|
||||
testJSONEscapeObj(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_AUTOPTR(virJSONValue) json = NULL;
|
||||
VIR_AUTOPTR(virJSONValue) nestjson = NULL;
|
||||
@ -437,7 +437,7 @@ testJSONEscapeObj(const void *data ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testJSONObjectFormatSteal(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testJSONObjectFormatSteal(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
VIR_AUTOPTR(virJSONValue) a1 = NULL;
|
||||
VIR_AUTOPTR(virJSONValue) a2 = NULL;
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
VIR_LOG_INIT("tests.keycodetest");
|
||||
|
||||
static int testKeycodeMapping(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testKeycodeMapping(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int got;
|
||||
@ -66,7 +66,7 @@ static int testKeycodeMapping(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testKeycodeStrings(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testKeycodeStrings(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int got;
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
VIR_LOG_INIT("tests.keyfiletest");
|
||||
|
||||
static int testParse(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testParse(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
static const char *cfg1 =
|
||||
"# Some config\n"
|
||||
|
@ -36,7 +36,7 @@ struct testInfo {
|
||||
# define VIR_FROM_THIS VIR_FROM_NONE
|
||||
|
||||
static int
|
||||
testKModConfig(const void *args ATTRIBUTE_UNUSED)
|
||||
testKModConfig(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
char *outbuf = NULL;
|
||||
|
@ -36,7 +36,7 @@ VIR_LOG_INIT("tests.lockspacetest");
|
||||
|
||||
#define LOCKSPACE_DIR abs_builddir "/virlockspacedata"
|
||||
|
||||
static int testLockSpaceCreate(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceCreate(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
@ -58,7 +58,7 @@ static int testLockSpaceCreate(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testLockSpaceResourceLifecycle(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceResourceLifecycle(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
@ -92,7 +92,7 @@ static int testLockSpaceResourceLifecycle(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testLockSpaceResourceLockExcl(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceResourceLockExcl(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
@ -138,7 +138,7 @@ static int testLockSpaceResourceLockExcl(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testLockSpaceResourceLockExclAuto(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceResourceLockExclAuto(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
@ -176,7 +176,7 @@ static int testLockSpaceResourceLockExclAuto(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testLockSpaceResourceLockShr(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceResourceLockShr(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
@ -230,7 +230,7 @@ static int testLockSpaceResourceLockShr(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testLockSpaceResourceLockShrAuto(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceResourceLockShrAuto(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
@ -290,7 +290,7 @@ static int testLockSpaceResourceLockShrAuto(const void *args ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testLockSpaceResourceLockPath(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testLockSpaceResourceLockPath(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virLockSpacePtr lockspace;
|
||||
int ret = -1;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#define VIR_MOCK_ARGNAME(a, b) b
|
||||
#define VIR_MOCK_ARGTYPE(a, b) a
|
||||
#define VIR_MOCK_ARGTYPENAME(a, b) a b
|
||||
#define VIR_MOCK_ARGTYPENAME_UNUSED(a, b) a b ATTRIBUTE_UNUSED
|
||||
#define VIR_MOCK_ARGTYPENAME_UNUSED(a, b) a b G_GNUC_UNUSED
|
||||
|
||||
#define VIR_MOCK_GET_ARG2(z, a, b) z(a, b)
|
||||
#define VIR_MOCK_GET_ARG3(z, a, b, c) z(a, b)
|
||||
|
@ -31,8 +31,8 @@ struct testClientPriv {
|
||||
|
||||
|
||||
static void *
|
||||
testClientNew(virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
testClientNew(virNetServerClientPtr client G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
struct testClientPriv *priv;
|
||||
|
||||
@ -46,7 +46,7 @@ testClientNew(virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
|
||||
|
||||
static virJSONValuePtr
|
||||
testClientPreExec(virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
testClientPreExec(virNetServerClientPtr client G_GNUC_UNUSED,
|
||||
void *data)
|
||||
{
|
||||
struct testClientPriv *priv = data;
|
||||
@ -237,7 +237,7 @@ struct testExecRestartData {
|
||||
};
|
||||
|
||||
static virNetServerPtr
|
||||
testNewServerPostExecRestart(virNetDaemonPtr dmn ATTRIBUTE_UNUSED,
|
||||
testNewServerPostExecRestart(virNetDaemonPtr dmn G_GNUC_UNUSED,
|
||||
const char *name,
|
||||
virJSONValuePtr object,
|
||||
void *opaque)
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
VIR_LOG_INIT("tests.netmessagetest");
|
||||
|
||||
static int testMessageHeaderEncode(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageHeaderEncode(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virNetMessagePtr msg = virNetMessageNew(true);
|
||||
static const char expect[] = {
|
||||
@ -84,7 +84,7 @@ static int testMessageHeaderEncode(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessageHeaderDecode(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessageHeaderDecode(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virNetMessagePtr msg = virNetMessageNew(true);
|
||||
static char input_buf [] = {
|
||||
@ -180,7 +180,7 @@ static int testMessageHeaderDecode(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessagePayloadEncode(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessagePayloadEncode(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virNetMessageError err;
|
||||
virNetMessagePtr msg = virNetMessageNew(true);
|
||||
@ -288,7 +288,7 @@ static int testMessagePayloadEncode(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessagePayloadDecode(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessagePayloadDecode(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virNetMessageError err;
|
||||
virNetMessagePtr msg = virNetMessageNew(true);
|
||||
@ -452,7 +452,7 @@ static int testMessagePayloadDecode(const void *args ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testMessagePayloadStreamEncode(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testMessagePayloadStreamEncode(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
char stream[] = "The quick brown fox jumps over the lazy dog";
|
||||
virNetMessagePtr msg = virNetMessageNew(true);
|
||||
|
@ -22,15 +22,15 @@
|
||||
#include "virutil.h"
|
||||
#include "internal.h"
|
||||
|
||||
int virEventAddTimeout(int frequency ATTRIBUTE_UNUSED,
|
||||
virEventTimeoutCallback cb ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED,
|
||||
virFreeCallback ff ATTRIBUTE_UNUSED)
|
||||
int virEventAddTimeout(int frequency G_GNUC_UNUSED,
|
||||
virEventTimeoutCallback cb G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED,
|
||||
virFreeCallback ff G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int virNetSocketGetUNIXIdentity(virNetSocketPtr sock ATTRIBUTE_UNUSED,
|
||||
int virNetSocketGetUNIXIdentity(virNetSocketPtr sock G_GNUC_UNUSED,
|
||||
uid_t *uid,
|
||||
gid_t *gid,
|
||||
pid_t *pid,
|
||||
@ -43,17 +43,17 @@ int virNetSocketGetUNIXIdentity(virNetSocketPtr sock ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *virGetUserName(uid_t uid ATTRIBUTE_UNUSED)
|
||||
char *virGetUserName(uid_t uid G_GNUC_UNUSED)
|
||||
{
|
||||
return strdup("astrochicken");
|
||||
}
|
||||
|
||||
char *virGetGroupName(gid_t gid ATTRIBUTE_UNUSED)
|
||||
char *virGetGroupName(gid_t gid G_GNUC_UNUSED)
|
||||
{
|
||||
return strdup("fictionalusers");
|
||||
}
|
||||
|
||||
int virNetSocketGetSELinuxContext(virNetSocketPtr sock ATTRIBUTE_UNUSED,
|
||||
int virNetSocketGetSELinuxContext(virNetSocketPtr sock G_GNUC_UNUSED,
|
||||
char **context)
|
||||
{
|
||||
if (!(*context = strdup("foo_u:bar_r:wizz_t:s0-s0:c0.c1023")))
|
||||
|
@ -27,8 +27,8 @@
|
||||
#ifdef HAVE_SOCKETPAIR
|
||||
|
||||
static void *
|
||||
testClientNew(virNetServerClientPtr client ATTRIBUTE_UNUSED,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
testClientNew(virNetServerClientPtr client G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
char *dummy;
|
||||
|
||||
@ -45,7 +45,7 @@ testClientFree(void *opaque)
|
||||
VIR_FREE(opaque);
|
||||
}
|
||||
|
||||
static int testIdentity(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testIdentity(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int sv[2];
|
||||
int ret = -1;
|
||||
|
@ -154,7 +154,7 @@ testSocketClient(void *opaque)
|
||||
|
||||
static void
|
||||
testSocketIncoming(virNetSocketPtr sock,
|
||||
int events ATTRIBUTE_UNUSED,
|
||||
int events G_GNUC_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
virNetSocketPtr *retsock = opaque;
|
||||
@ -305,7 +305,7 @@ testSocketAccept(const void *opaque)
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testSocketUNIXAddrs(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virNetSocketPtr lsock = NULL; /* Listen socket */
|
||||
virNetSocketPtr ssock = NULL; /* Server socket */
|
||||
@ -393,7 +393,7 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testSocketCommandNormal(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testSocketCommandNormal(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virNetSocketPtr csock = NULL; /* Client socket */
|
||||
char buf[100];
|
||||
@ -421,7 +421,7 @@ static int testSocketCommandNormal(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testSocketCommandFail(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testSocketCommandFail(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virNetSocketPtr csock = NULL; /* Client socket */
|
||||
char buf[100];
|
||||
|
@ -108,7 +108,7 @@ virNumaGetNodeMemory(int node,
|
||||
}
|
||||
|
||||
int
|
||||
virNumaGetDistances(int node ATTRIBUTE_UNUSED,
|
||||
virNumaGetDistances(int node G_GNUC_UNUSED,
|
||||
int **distances,
|
||||
int *ndistances)
|
||||
{
|
||||
|
@ -909,7 +909,7 @@ pci_driver_handle_drivers_probe(const char *path)
|
||||
}
|
||||
|
||||
static int
|
||||
pci_driver_handle_change(int fd ATTRIBUTE_UNUSED, const char *path)
|
||||
pci_driver_handle_change(int fd G_GNUC_UNUSED, const char *path)
|
||||
{
|
||||
int ret;
|
||||
const char *file = last_component(path);
|
||||
|
@ -55,7 +55,7 @@ testVirPCIDeviceCheckDriver(virPCIDevicePtr dev, const char *expected)
|
||||
}
|
||||
|
||||
static int
|
||||
testVirPCIDeviceNew(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirPCIDeviceNew(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virPCIDevicePtr dev;
|
||||
@ -87,7 +87,7 @@ testVirPCIDeviceNew(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testVirPCIDeviceDetach(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirPCIDeviceDetach(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virPCIDevicePtr dev[] = {NULL, NULL, NULL};
|
||||
@ -128,7 +128,7 @@ testVirPCIDeviceDetach(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testVirPCIDeviceReset(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirPCIDeviceReset(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virPCIDevicePtr dev[] = {NULL, NULL, NULL};
|
||||
@ -163,7 +163,7 @@ testVirPCIDeviceReset(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testVirPCIDeviceReattach(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirPCIDeviceReattach(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
virPCIDevicePtr dev[] = {NULL, NULL, NULL};
|
||||
|
@ -143,7 +143,7 @@ VIR_MOCK_WRAP_RET_ARGS(dbus_connection_send_with_reply_and_block,
|
||||
|
||||
|
||||
|
||||
static int testPolkitAuthSuccess(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testPolkitAuthSuccess(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
@ -162,7 +162,7 @@ static int testPolkitAuthSuccess(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testPolkitAuthDenied(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testPolkitAuthDenied(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int rv;
|
||||
@ -196,7 +196,7 @@ static int testPolkitAuthDenied(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testPolkitAuthChallenge(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testPolkitAuthChallenge(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int rv;
|
||||
@ -231,7 +231,7 @@ static int testPolkitAuthChallenge(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testPolkitAuthCancelled(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testPolkitAuthCancelled(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int rv;
|
||||
@ -265,7 +265,7 @@ static int testPolkitAuthCancelled(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testPolkitAuthDetailsSuccess(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testPolkitAuthDetailsSuccess(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
const char *details[] = {
|
||||
@ -288,7 +288,7 @@ static int testPolkitAuthDetailsSuccess(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testPolkitAuthDetailsDenied(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testPolkitAuthDetailsDenied(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
int rv;
|
||||
|
@ -68,9 +68,9 @@ int socket(int domain,
|
||||
return realsocket(domain, type, protocol);
|
||||
}
|
||||
|
||||
int bind(int sockfd ATTRIBUTE_UNUSED,
|
||||
int bind(int sockfd G_GNUC_UNUSED,
|
||||
const struct sockaddr *addr,
|
||||
socklen_t addrlen ATTRIBUTE_UNUSED)
|
||||
socklen_t addrlen G_GNUC_UNUSED)
|
||||
{
|
||||
struct sockaddr_in saddr;
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
VIR_LOG_INIT("tests.portallocatortest");
|
||||
|
||||
static int testAllocAll(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testAllocAll(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virPortAllocatorRangePtr ports = virPortAllocatorRangeNew("test", 5900, 5909);
|
||||
int ret = -1;
|
||||
@ -109,7 +109,7 @@ static int testAllocAll(const void *args ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
|
||||
static int testAllocReuse(const void *args ATTRIBUTE_UNUSED)
|
||||
static int testAllocReuse(const void *args G_GNUC_UNUSED)
|
||||
{
|
||||
virPortAllocatorRangePtr ports = virPortAllocatorRangeNew("test", 5900, 5910);
|
||||
int ret = -1;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "virprocess.h"
|
||||
|
||||
int
|
||||
virProcessSetMaxMemLock(pid_t pid ATTRIBUTE_UNUSED, unsigned long long bytes ATTRIBUTE_UNUSED)
|
||||
virProcessSetMaxMemLock(pid_t pid G_GNUC_UNUSED, unsigned long long bytes G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ uint64_t virRandomBits(int nbits)
|
||||
}
|
||||
|
||||
int virRandomGenerateWWN(char **wwn,
|
||||
const char *virt_type ATTRIBUTE_UNUSED)
|
||||
const char *virt_type G_GNUC_UNUSED)
|
||||
{
|
||||
return virAsprintf(wwn, "5100000%09llx",
|
||||
(unsigned long long)virRandomBits(36));
|
||||
|
@ -161,7 +161,7 @@ static int testRotatingFileInitFiles(off_t baseSize,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testRotatingFileWriterNew(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterNew(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -204,7 +204,7 @@ static int testRotatingFileWriterNew(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterAppend(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterAppend(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -247,7 +247,7 @@ static int testRotatingFileWriterAppend(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterTruncate(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterTruncate(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -290,7 +290,7 @@ static int testRotatingFileWriterTruncate(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterRolloverNone(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterRolloverNone(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -333,7 +333,7 @@ static int testRotatingFileWriterRolloverNone(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterRolloverOne(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterRolloverOne(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -378,7 +378,7 @@ static int testRotatingFileWriterRolloverOne(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterRolloverAppend(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterRolloverAppend(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -421,7 +421,7 @@ static int testRotatingFileWriterRolloverAppend(const void *data ATTRIBUTE_UNUSE
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterRolloverMany(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterRolloverMany(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -470,7 +470,7 @@ static int testRotatingFileWriterRolloverMany(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterRolloverLineBreak(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterRolloverLineBreak(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -512,7 +512,7 @@ static int testRotatingFileWriterRolloverLineBreak(const void *data ATTRIBUTE_UN
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileWriterLargeFile(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileWriterLargeFile(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileWriterPtr file;
|
||||
int ret = -1;
|
||||
@ -554,7 +554,7 @@ static int testRotatingFileWriterLargeFile(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testRotatingFileReaderOne(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileReaderOne(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileReaderPtr file;
|
||||
int ret = -1;
|
||||
@ -586,7 +586,7 @@ static int testRotatingFileReaderOne(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testRotatingFileReaderAll(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileReaderAll(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileReaderPtr file;
|
||||
int ret = -1;
|
||||
@ -618,7 +618,7 @@ static int testRotatingFileReaderAll(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testRotatingFileReaderPartial(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileReaderPartial(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileReaderPtr file;
|
||||
int ret = -1;
|
||||
@ -650,7 +650,7 @@ static int testRotatingFileReaderPartial(const void *data ATTRIBUTE_UNUSED)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int testRotatingFileReaderSeek(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testRotatingFileReaderSeek(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virRotatingFileReaderPtr file;
|
||||
int ret = -1;
|
||||
|
@ -33,7 +33,7 @@ VIR_LOG_INIT("tests.scsitest");
|
||||
static char *virscsi_prefix;
|
||||
|
||||
static int
|
||||
test1(const void *data ATTRIBUTE_UNUSED)
|
||||
test1(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
char *name = NULL;
|
||||
int ret = -1;
|
||||
@ -57,7 +57,7 @@ test1(const void *data ATTRIBUTE_UNUSED)
|
||||
* details.
|
||||
*/
|
||||
static int
|
||||
test2(const void *data ATTRIBUTE_UNUSED)
|
||||
test2(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
virSCSIDeviceListPtr list = NULL;
|
||||
virSCSIDevicePtr dev = NULL;
|
||||
|
@ -92,7 +92,7 @@ static char *custom_uri;
|
||||
"--connect", \
|
||||
custom_uri
|
||||
|
||||
static int testCompareListDefault(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareListDefault(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_DEFAULT, "list", NULL };
|
||||
const char *exp = "\
|
||||
@ -103,7 +103,7 @@ static int testCompareListDefault(const void *data ATTRIBUTE_UNUSED)
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareListCustom(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareListCustom(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "list", NULL };
|
||||
const char *exp = "\
|
||||
@ -115,7 +115,7 @@ static int testCompareListCustom(const void *data ATTRIBUTE_UNUSED)
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareNodeinfoDefault(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareNodeinfoDefault(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_DEFAULT, "nodeinfo", NULL };
|
||||
const char *exp = "\
|
||||
@ -131,7 +131,7 @@ Memory size: 3145728 KiB\n\
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareNodeinfoCustom(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareNodeinfoCustom(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = {
|
||||
VIRSH_CUSTOM,
|
||||
@ -151,84 +151,84 @@ Memory size: 8192000 KiB\n\
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDominfoByID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDominfoByID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "dominfo", "2", NULL };
|
||||
const char *exp = dominfo_fc4;
|
||||
return testCompareOutputLit(exp, "\nCPU time:", argv);
|
||||
}
|
||||
|
||||
static int testCompareDominfoByUUID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDominfoByUUID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "dominfo", DOM_UUID, NULL };
|
||||
const char *exp = dominfo_fc4;
|
||||
return testCompareOutputLit(exp, "\nCPU time:", argv);
|
||||
}
|
||||
|
||||
static int testCompareDominfoByName(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDominfoByName(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "dominfo", "fc4", NULL };
|
||||
const char *exp = dominfo_fc4;
|
||||
return testCompareOutputLit(exp, "\nCPU time:", argv);
|
||||
}
|
||||
|
||||
static int testCompareDomuuidByID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomuuidByID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domuuid", "2", NULL };
|
||||
const char *exp = domuuid_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomuuidByName(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomuuidByName(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domuuid", "fc4", NULL };
|
||||
const char *exp = domuuid_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomidByName(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomidByName(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domid", "fc4", NULL };
|
||||
const char *exp = domid_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomidByUUID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomidByUUID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domid", DOM_UUID, NULL };
|
||||
const char *exp = domid_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomnameByID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomnameByID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domname", "2", NULL };
|
||||
const char *exp = domname_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomnameByUUID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomnameByUUID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domname", DOM_UUID, NULL };
|
||||
const char *exp = domname_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomstateByID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomstateByID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domstate", "2", NULL };
|
||||
const char *exp = domstate_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomstateByUUID(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomstateByUUID(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domstate", DOM_UUID, NULL };
|
||||
const char *exp = domstate_fc4;
|
||||
return testCompareOutputLit(exp, NULL, argv);
|
||||
}
|
||||
|
||||
static int testCompareDomstateByName(const void *data ATTRIBUTE_UNUSED)
|
||||
static int testCompareDomstateByName(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
const char *const argv[] = { VIRSH_CUSTOM, "domstate", "fc4", NULL };
|
||||
const char *exp = domstate_fc4;
|
||||
|
@ -472,7 +472,7 @@ static const char *testPathCanonicalizeSymlinks[][2] =
|
||||
static int
|
||||
testPathCanonicalizeReadlink(const char *path,
|
||||
char **linkpath,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
void *data G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
|
@ -261,7 +261,7 @@ testStrdupLookup2(size_t i)
|
||||
}
|
||||
|
||||
static int
|
||||
testStrdup(const void *data ATTRIBUTE_UNUSED)
|
||||
testStrdup(const void *data G_GNUC_UNUSED)
|
||||
{
|
||||
char *array[] = { NULL, NULL };
|
||||
size_t i = 0;
|
||||
@ -331,7 +331,7 @@ testStrdup(const void *data ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testStrndupNegative(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testStrndupNegative(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = -1;
|
||||
char *dst;
|
||||
@ -367,7 +367,7 @@ testStrndupNegative(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testStringSortCompare(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testStringSortCompare(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const char *randlist[] = {
|
||||
"tasty", "astro", "goat", "chicken", "turducken",
|
||||
@ -513,7 +513,7 @@ struct stringReplaceData {
|
||||
};
|
||||
|
||||
static int
|
||||
testStringReplace(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testStringReplace(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
const struct stringReplaceData *data = opaque;
|
||||
char *result;
|
||||
@ -690,7 +690,7 @@ testStringToDouble(const void *opaque)
|
||||
/* The point of this test is to check whether all members of the array are
|
||||
* freed. The test has to be checked using valgrind. */
|
||||
static int
|
||||
testVirStringListFreeCount(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVirStringListFreeCount(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
char **list;
|
||||
|
||||
|
@ -160,7 +160,7 @@ VIR_MOCK_WRAP_RET_ARGS(dbus_connection_send_with_reply_and_block,
|
||||
}
|
||||
|
||||
|
||||
static int testCreateContainer(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testCreateContainer(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned char uuid[VIR_UUID_BUFLEN] = {
|
||||
1, 1, 1, 1,
|
||||
@ -183,7 +183,7 @@ static int testCreateContainer(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testTerminateContainer(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testTerminateContainer(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (virSystemdTerminateMachine("lxc-demo") < 0) {
|
||||
fprintf(stderr, "%s", "Failed to terminate LXC machine\n");
|
||||
@ -193,7 +193,7 @@ static int testTerminateContainer(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testCreateMachine(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testCreateMachine(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned char uuid[VIR_UUID_BUFLEN] = {
|
||||
1, 1, 1, 1,
|
||||
@ -216,7 +216,7 @@ static int testCreateMachine(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testTerminateMachine(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testTerminateMachine(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (virSystemdTerminateMachine("test-qemu-demo") < 0) {
|
||||
fprintf(stderr, "%s", "Failed to terminate KVM machine\n");
|
||||
@ -226,7 +226,7 @@ static int testTerminateMachine(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testCreateNoSystemd(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testCreateNoSystemd(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned char uuid[VIR_UUID_BUFLEN] = {
|
||||
1, 1, 1, 1,
|
||||
@ -260,7 +260,7 @@ static int testCreateNoSystemd(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testCreateSystemdNotRunning(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testCreateSystemdNotRunning(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned char uuid[VIR_UUID_BUFLEN] = {
|
||||
1, 1, 1, 1,
|
||||
@ -294,7 +294,7 @@ static int testCreateSystemdNotRunning(const void *opaque ATTRIBUTE_UNUSED)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int testCreateBadSystemd(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testCreateBadSystemd(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned char uuid[VIR_UUID_BUFLEN] = {
|
||||
1, 1, 1, 1,
|
||||
@ -329,7 +329,7 @@ static int testCreateBadSystemd(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
|
||||
static int testCreateNetwork(const void *opaque ATTRIBUTE_UNUSED)
|
||||
static int testCreateNetwork(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
unsigned char uuid[VIR_UUID_BUFLEN] = {
|
||||
1, 1, 1, 1,
|
||||
@ -358,7 +358,7 @@ static int testCreateNetwork(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testGetMachineName(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testGetMachineName(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
char *tmp = virSystemdGetMachineNameByPID(1234);
|
||||
int ret = -1;
|
||||
@ -639,7 +639,7 @@ testActivation(bool useNames)
|
||||
|
||||
|
||||
static int
|
||||
testActivationEmpty(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testActivationEmpty(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virSystemdActivationPtr act;
|
||||
|
||||
@ -659,14 +659,14 @@ testActivationEmpty(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
|
||||
static int
|
||||
testActivationFDNames(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testActivationFDNames(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
return testActivation(true);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
testActivationFDAddrs(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testActivationFDAddrs(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
return testActivation(false);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ int access(const char *path, int mode)
|
||||
|
||||
#include "virmockstathelpers.c"
|
||||
|
||||
static int virMockStatRedirect(const char *path ATTRIBUTE_UNUSED, char **newpath ATTRIBUTE_UNUSED)
|
||||
static int virMockStatRedirect(const char *path G_GNUC_UNUSED, char **newpath G_GNUC_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ testTypedParamsValidate(const void *opaque)
|
||||
.nparams = PARAMS_SIZE(__VA_ARGS__),
|
||||
|
||||
static int
|
||||
testTypedParamsFilter(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testTypedParamsFilter(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i, nfiltered;
|
||||
int rv = -1;
|
||||
@ -126,7 +126,7 @@ testTypedParamsFilter(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testTypedParamsAddStringList(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testTypedParamsAddStringList(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int rv = 0;
|
||||
virTypedParameterPtr params = NULL;
|
||||
@ -151,7 +151,7 @@ testTypedParamsAddStringList(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testTypedParamsGetStringList(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testTypedParamsGetStringList(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
size_t i;
|
||||
int picked;
|
||||
|
@ -47,7 +47,7 @@ struct findTestInfo {
|
||||
|
||||
static int testDeviceFileActor(virUSBDevicePtr dev,
|
||||
const char *path,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
char *str = NULL;
|
||||
int ret = 0;
|
||||
@ -147,7 +147,7 @@ testCheckNdevs(const char* occasion,
|
||||
|
||||
|
||||
static int
|
||||
testUSBList(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testUSBList(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
virUSBDeviceListPtr list = NULL;
|
||||
virUSBDeviceListPtr devlist = NULL;
|
||||
|
@ -131,7 +131,7 @@ testCompareHelper(const void *data)
|
||||
}
|
||||
|
||||
static char *
|
||||
testParseVMXFileName(const char *fileName, void *opaque ATTRIBUTE_UNUSED)
|
||||
testParseVMXFileName(const char *fileName, void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
char *copyOfFileName = NULL;
|
||||
char *tmp = NULL;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "../tools/vsh-table.h"
|
||||
|
||||
static int
|
||||
testVshTableNew(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVshTableNew(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (vshTableNew(NULL)) {
|
||||
fprintf(stderr, "expected failure when passing null to vshTableNew\n");
|
||||
@ -38,7 +38,7 @@ testVshTableNew(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testVshTableHeader(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVshTableHeader(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
char *act = NULL;
|
||||
@ -76,7 +76,7 @@ testVshTableHeader(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testVshTableRowAppend(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testVshTableRowAppend(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -112,7 +112,7 @@ testVshTableRowAppend(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testUnicode(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testUnicode(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
char *act = NULL;
|
||||
@ -144,7 +144,7 @@ testUnicode(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Point of this test is to see how table behaves with right to left writing*/
|
||||
static int
|
||||
testUnicodeArabic(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testUnicodeArabic(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
char *act = NULL;
|
||||
@ -187,7 +187,7 @@ testUnicodeArabic(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Testing zero-width characters by inserting few zero-width spaces */
|
||||
static int
|
||||
testUnicodeZeroWidthChar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testUnicodeZeroWidthChar(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
vshTablePtr table = NULL;
|
||||
@ -224,7 +224,7 @@ testUnicodeZeroWidthChar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testUnicodeCombiningChar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testUnicodeCombiningChar(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
vshTablePtr table = NULL;
|
||||
@ -253,7 +253,7 @@ testUnicodeCombiningChar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
|
||||
/* Testing zero-width characters by inserting few zero-width spaces */
|
||||
static int
|
||||
testUnicodeNonPrintableChar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testUnicodeNonPrintableChar(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
vshTablePtr table = NULL;
|
||||
@ -281,7 +281,7 @@ testUnicodeNonPrintableChar(const void *opaque ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
static int
|
||||
testNTables(const void *opaque ATTRIBUTE_UNUSED)
|
||||
testNTables(const void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
int ret = 0;
|
||||
vshTablePtr table1 = NULL;
|
||||
|
@ -132,8 +132,8 @@ testCompareHelper(const void *data)
|
||||
}
|
||||
|
||||
static int
|
||||
testAutodetectSCSIControllerModel(virDomainDiskDefPtr def ATTRIBUTE_UNUSED,
|
||||
int *model, void *opaque ATTRIBUTE_UNUSED)
|
||||
testAutodetectSCSIControllerModel(virDomainDiskDefPtr def G_GNUC_UNUSED,
|
||||
int *model, void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
*model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_LSILOGIC;
|
||||
|
||||
@ -141,7 +141,7 @@ testAutodetectSCSIControllerModel(virDomainDiskDefPtr def ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
static char *
|
||||
testFormatVMXFileName(const char *src, void *opaque ATTRIBUTE_UNUSED)
|
||||
testFormatVMXFileName(const char *src, void *opaque G_GNUC_UNUSED)
|
||||
{
|
||||
bool success = false;
|
||||
char *copyOfDatastorePath = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user