[PATCH 1/3] tests: do not use GCC variadic macro extension for xgcry_control
Jussi Kivilinna
jussi.kivilinna at iki.fi
Tue May 14 18:45:55 CEST 2019
* tests/t-common.h (xgcry_control): Use doubly nested parenthesis for
passing arguments for gcry_control instead of GCC specific variadic
macro extension.
* tests/aeswrap.c: Change xgcry_control to use doubly nested
parenthesis.
* tests/basic.c: Ditto.
* tests/bench-slope.c: Ditto.
* tests/benchmark.c: Ditto.
* tests/curves.c: Ditto.
* tests/dsa-rfc6979.c: Ditto.
* tests/fips186-dsa: Ditto.
* tests/fipsdrv.c: Ditto.
* tests/fipsrngdrv.c: Ditto.
* tests/gchash.c: Ditto.
* tests/hashtest.c: Ditto.
* tests/hmac.c: Ditto.
* tests/keygen.c: Ditto.
* tests/keygrip.c: Ditto.
* tests/mpitests.c: Ditto.
* tests/pkbench.c: Ditto.
* tests/pkcs1v2.c: Ditto.
* tests/prime.c: Ditto.
* tests/pubkey.c: Ditto.
* tests/random.c: Ditto.
* tests/rsacvt.c: Ditto.
* tests/t-convert.c: Ditto.
* tests/t-cv25519.c: Ditto.
* tests/t-ed25519.c: Ditto.
* tests/t-kdf.c: Ditto.
* tests/t-lock.c: Ditto.
* tests/t-mpi-bit.c: Ditto.
* tests/t-mpi-point.c: Ditto.
* tests/t-secmem.c: Ditto.
* tests/t-sexp.c: Ditto.
* tests/version.c: Ditto.
--
GnuPG-bug-id: 4499
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
0 files changed
diff --git a/tests/aeswrap.c b/tests/aeswrap.c
index dbbd7dd9a..7c7e60bf1 100644
--- a/tests/aeswrap.c
+++ b/tests/aeswrap.c
@@ -274,10 +274,10 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
check_all ();
return error_count ? 1 : 0;
diff --git a/tests/basic.c b/tests/basic.c
index b0c292a0e..fd074cba7 100644
--- a/tests/basic.c
+++ b/tests/basic.c
@@ -12520,10 +12520,10 @@ main (int argc, char **argv)
}
}
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (use_fips)
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
/* Check that we test exactly our version - including the patchlevel. */
if (strcmp (GCRYPT_VERSION, gcry_check_version (NULL)))
@@ -12534,16 +12534,16 @@ main (int argc, char **argv)
in_fips_mode = 1;
if (!in_fips_mode)
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (verbose)
gcry_set_progress_handler (progress_handler, NULL);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
/* No valuable keys are create, so we can speed up our RNG. */
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
do
{
@@ -12580,7 +12580,7 @@ main (int argc, char **argv)
gcry_md_hd_t md;
/* First trigger a self-test. */
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
if (!gcry_control (GCRYCTL_OPERATIONAL_P, 0))
fail ("not in operational state after self-test\n");
@@ -12609,7 +12609,7 @@ main (int argc, char **argv)
{
/* Now run a self-test and to get back into
operational state. */
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
if (!gcry_control (GCRYCTL_OPERATIONAL_P, 0))
fail ("did not reach operational after error "
"and self-test\n");
diff --git a/tests/bench-slope.c b/tests/bench-slope.c
index 2ead3c9e2..63f8f7ae5 100644
--- a/tests/bench-slope.c
+++ b/tests/bench-slope.c
@@ -2292,7 +2292,7 @@ main (int argc, char **argv)
}
}
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int) verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int) verbose));
if (!gcry_check_version (GCRYPT_VERSION))
{
@@ -2302,11 +2302,11 @@ main (int argc, char **argv)
}
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
if (in_regression_test)
fputs ("Note: " PGM " running in quick regression test mode.\n", stdout);
diff --git a/tests/benchmark.c b/tests/benchmark.c
index 418f92913..0f15c0d89 100644
--- a/tests/benchmark.c
+++ b/tests/benchmark.c
@@ -461,7 +461,7 @@ random_bench (int very_strong)
putchar ('\n');
if (verbose)
- xgcry_control (GCRYCTL_DUMP_RANDOM_STATS);
+ xgcry_control ((GCRYCTL_DUMP_RANDOM_STATS));
}
@@ -1791,17 +1791,17 @@ main( int argc, char **argv )
{
/* This is anyway the default, but we may want to use it for
debugging. */
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_STANDARD);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_STANDARD));
argc--; argv++;
}
else if (!strcmp (*argv, "--prefer-fips-rng"))
{
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS));
argc--; argv++;
}
else if (!strcmp (*argv, "--prefer-system-rng"))
{
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM));
argc--; argv++;
}
else if (!strcmp (*argv, "--no-blinding"))
@@ -1884,7 +1884,7 @@ main( int argc, char **argv )
{
argc--; argv++;
/* This command needs to be called before gcry_check_version. */
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
}
else if (!strcmp (*argv, "--progress"))
{
@@ -1896,7 +1896,7 @@ main( int argc, char **argv )
if (buffer_alignment < 1 || buffer_alignment > 16)
die ("value for --alignment must be in the range 1 to 16\n");
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (!gcry_check_version (GCRYPT_VERSION))
{
@@ -1906,20 +1906,20 @@ main( int argc, char **argv )
}
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
if (gcry_fips_mode_active ())
in_fips_mode = 1;
else if (!use_secmem)
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (use_random_daemon)
- xgcry_control (GCRYCTL_USE_RANDOM_DAEMON, 1);
+ xgcry_control ((GCRYCTL_USE_RANDOM_DAEMON, 1));
if (with_progress)
gcry_set_progress_handler (progress_cb, NULL);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (cipher_repetitions < 1)
cipher_repetitions = 1;
@@ -1933,7 +1933,7 @@ main( int argc, char **argv )
if ( !argc )
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
md_bench (NULL);
putchar ('\n');
mac_bench (NULL);
@@ -1955,9 +1955,9 @@ main( int argc, char **argv )
random_bench ((**argv == 's'));
else if (argc == 2)
{
- xgcry_control (GCRYCTL_SET_RANDOM_SEED_FILE, argv[1]);
+ xgcry_control ((GCRYCTL_SET_RANDOM_SEED_FILE, argv[1]));
random_bench ((**argv == 's'));
- xgcry_control (GCRYCTL_UPDATE_RANDOM_SEED_FILE);
+ xgcry_control ((GCRYCTL_UPDATE_RANDOM_SEED_FILE));
}
else
fputs ("usage: benchmark [strong]random [seedfile]\n", stdout);
@@ -1992,7 +1992,7 @@ main( int argc, char **argv )
}
else if ( !strcmp (*argv, "pubkey"))
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
rsa_bench (pk_count, 1, no_blinding);
elg_bench (pk_count, 0);
dsa_bench (pk_count, 0);
@@ -2000,27 +2000,27 @@ main( int argc, char **argv )
}
else if ( !strcmp (*argv, "rsa"))
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
rsa_bench (pk_count, 1, no_blinding);
}
else if ( !strcmp (*argv, "elg"))
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
elg_bench (pk_count, 1);
}
else if ( !strcmp (*argv, "dsa"))
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
dsa_bench (pk_count, 1);
}
else if ( !strcmp (*argv, "ecc"))
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
ecc_bench (pk_count, 1);
}
else if ( !strcmp (*argv, "prime"))
{
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
prime_bench ();
}
else
diff --git a/tests/curves.c b/tests/curves.c
index 9e75fd554..dc5ebe77f 100644
--- a/tests/curves.c
+++ b/tests/curves.c
@@ -178,10 +178,10 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
list_curves ();
check_matching ();
check_get_params ();
diff --git a/tests/dsa-rfc6979.c b/tests/dsa-rfc6979.c
index 2cfa94a83..7d3d20803 100644
--- a/tests/dsa-rfc6979.c
+++ b/tests/dsa-rfc6979.c
@@ -966,16 +966,16 @@ main (int argc, char **argv)
debug = 1;
}
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
/* Check that we test exactly our version - including the patchlevel. */
if (strcmp (GCRYPT_VERSION, gcry_check_version (NULL)))
die ("version mismatch; pgm=%s, library=%s\n",
GCRYPT_VERSION,gcry_check_version (NULL));
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
/* No valuable keys are create, so we can speed up our RNG. */
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
check_dsa_rfc6979 ();
diff --git a/tests/fips186-dsa.c b/tests/fips186-dsa.c
index b5f0cf0b5..5ed5653b6 100644
--- a/tests/fips186-dsa.c
+++ b/tests/fips186-dsa.c
@@ -411,14 +411,14 @@ main (int argc, char **argv)
debug = 1;
}
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
/* No valuable keys are create, so we can speed up our RNG. */
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
check_dsa_gen_186_2 ();
diff --git a/tests/fipsdrv.c b/tests/fipsdrv.c
index 71554e236..f6268e2ac 100644
--- a/tests/fipsdrv.c
+++ b/tests/fipsdrv.c
@@ -929,7 +929,7 @@ run_external_rng_test (void *context, void *buffer, size_t buflen)
static void
deinit_external_rng_test (void *context)
{
- xgcry_control (PRIV_CTL_DEINIT_EXTRNG_TEST, context);
+ xgcry_control ((PRIV_CTL_DEINIT_EXTRNG_TEST, context));
}
@@ -2476,16 +2476,16 @@ main (int argc, char **argv)
if (verbose)
fprintf (stderr, PGM ": started (mode=%s)\n", mode_string);
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (!no_fips)
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
if (!gcry_check_version ("1.4.3"))
die ("Libgcrypt is not sufficient enough\n");
if (verbose)
fprintf (stderr, PGM ": using Libgcrypt %s\n", gcry_check_version (NULL));
if (no_fips)
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
/* Most operations need some input data. */
if (!chunksize
diff --git a/tests/fipsrngdrv.c b/tests/fipsrngdrv.c
index d6023c7f8..17cc92041 100644
--- a/tests/fipsrngdrv.c
+++ b/tests/fipsrngdrv.c
@@ -111,7 +111,7 @@ run_external_test (void *context, void *buffer, size_t buflen)
static void
deinit_external_test (void *context)
{
- xgcry_control (60, context);
+ xgcry_control ((60, context));
}
@@ -208,13 +208,13 @@ main (int argc, char **argv)
if (verbose)
fputs (PGM ": started\n", stderr);
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (!no_fips)
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
if (!gcry_check_version ("1.4.3"))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
/* The flag value 1 disables the dup check, so that the RNG returns
all generated data. */
diff --git a/tests/gchash.c b/tests/gchash.c
index 83dc7b559..43ce53ba3 100644
--- a/tests/gchash.c
+++ b/tests/gchash.c
@@ -43,15 +43,15 @@ init_gcrypt (void)
exit (2);
}
- xgcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
+ xgcry_control ((GCRYCTL_SUSPEND_SECMEM_WARN));
/* Allocate a pool of 16k secure memory. This make the secure memory
* available and also drops privileges where needed. */
- xgcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
+ xgcry_control ((GCRYCTL_INIT_SECMEM, 16384, 0));
- xgcry_control (GCRYCTL_RESUME_SECMEM_WARN);
+ xgcry_control ((GCRYCTL_RESUME_SECMEM_WARN));
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
}
int
diff --git a/tests/hashtest.c b/tests/hashtest.c
index 339459494..4c9704f3f 100644
--- a/tests/hashtest.c
+++ b/tests/hashtest.c
@@ -394,13 +394,13 @@ main (int argc, char **argv)
if (gigs < 0 || gigs > 1024*1024)
die ("value for --gigs must be in the range 0 to %d", 1024*1024);
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
/* A quick check that all given algorithms are valid. */
for (idx=0; idx < argc; idx++)
diff --git a/tests/hmac.c b/tests/hmac.c
index 5852ee4a5..2b4c0f9f9 100644
--- a/tests/hmac.c
+++ b/tests/hmac.c
@@ -192,10 +192,10 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
check_hmac ();
check_hmac_multi ();
diff --git a/tests/keygen.c b/tests/keygen.c
index 6b6a60a4e..4e7dfd35d 100644
--- a/tests/keygen.c
+++ b/tests/keygen.c
@@ -733,22 +733,22 @@ main (int argc, char **argv)
break;
}
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (opt_fips)
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
if (!opt_fips)
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
/* No valuable keys are create, so we can speed up our RNG. */
if (!no_quick)
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
if (with_progress)
gcry_set_progress_handler (progress_cb, NULL);
diff --git a/tests/keygrip.c b/tests/keygrip.c
index 73a6f812a..63171502c 100644
--- a/tests/keygrip.c
+++ b/tests/keygrip.c
@@ -319,10 +319,10 @@ main (int argc, char **argv)
gcry_set_progress_handler (progress_handler, NULL);
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
check ();
diff --git a/tests/mpitests.c b/tests/mpitests.c
index 9b4a66c29..96e015516 100644
--- a/tests/mpitests.c
+++ b/tests/mpitests.c
@@ -595,7 +595,7 @@ main (int argc, char* argv[])
fputs ("version mismatch\n", stderr);
exit (1);
}
- xgcry_control(GCRYCTL_DISABLE_SECMEM);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM));
test_const_and_immutable ();
test_opaque ();
diff --git a/tests/pkbench.c b/tests/pkbench.c
index e458b4295..a7665f461 100644
--- a/tests/pkbench.c
+++ b/tests/pkbench.c
@@ -441,12 +441,12 @@ main (int argc, char **argv)
}
}
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (fips_mode)
- xgcry_control (GCRYCTL_FORCE_FIPS_MODE, 0);
+ xgcry_control ((GCRYCTL_FORCE_FIPS_MODE, 0));
- xgcry_control (GCRYCTL_DISABLE_SECMEM);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM));
if (!gcry_check_version (GCRYPT_VERSION))
{
fprintf (stderr, PGM ": version mismatch\n");
@@ -456,11 +456,11 @@ main (int argc, char **argv)
if (genkey_mode)
{
/* No valuable keys are create, so we can speed up our RNG. */
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
}
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (genkey_mode && argc == 2)
diff --git a/tests/pkcs1v2.c b/tests/pkcs1v2.c
index b52bff810..968d3fea2 100644
--- a/tests/pkcs1v2.c
+++ b/tests/pkcs1v2.c
@@ -650,15 +650,15 @@ main (int argc, char **argv)
if (!run_oaep && !run_pss && !run_v15c && !run_v15s)
run_oaep = run_pss = run_v15c = run_v15s = 1;
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version ("1.5.0"))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
/* No valuable keys are create, so we can speed up our RNG. */
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
if (run_oaep)
check_oaep ();
diff --git a/tests/prime.c b/tests/prime.c
index 5e90ce063..422649806 100644
--- a/tests/prime.c
+++ b/tests/prime.c
@@ -224,13 +224,13 @@ main (int argc, char **argv)
else if ((argc > 1) && (! strcmp (argv[1], "--42")))
verbose = debug = mode42 = 1;
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (! gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
if (mode42)
create_42prime ();
diff --git a/tests/pubkey.c b/tests/pubkey.c
index fbb7bbb5b..748d051ea 100644
--- a/tests/pubkey.c
+++ b/tests/pubkey.c
@@ -1179,14 +1179,14 @@ main (int argc, char **argv)
debug = 1;
}
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
/* No valuable keys are create, so we can speed up our RNG. */
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
for (i=0; i < 2; i++)
check_run ();
diff --git a/tests/random.c b/tests/random.c
index 2f48323f3..22927a613 100644
--- a/tests/random.c
+++ b/tests/random.c
@@ -292,7 +292,7 @@ check_close_random_device (void)
die ("fork failed: %s\n", strerror (errno));
if (!pid)
{
- xgcry_control (GCRYCTL_CLOSE_RANDOM_DEVICE, 0);
+ xgcry_control ((GCRYCTL_CLOSE_RANDOM_DEVICE, 0));
/* The next call will re-open the device. */
gcry_randomize (buf, sizeof buf, GCRY_STRONG_RANDOM);
@@ -345,7 +345,7 @@ check_rng_type_switching (void)
if (rngtype != rng_type ())
die ("RNG type unexpectedly changed\n");
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM));
rngtype = rng_type ();
if (debug)
@@ -358,7 +358,7 @@ check_rng_type_switching (void)
if (rngtype != rng_type ())
die ("RNG type unexpectedly changed\n");
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS));
rngtype = rng_type ();
if (debug)
@@ -371,7 +371,7 @@ check_rng_type_switching (void)
if (rngtype != rng_type ())
die ("RNG type unexpectedly changed\n");
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_STANDARD);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_STANDARD));
rngtype = rng_type ();
if (debug)
@@ -399,7 +399,7 @@ check_early_rng_type_switching (void)
info ("rng type: %d\n", rngtype);
initial = rngtype;
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM));
rngtype = rng_type ();
if (debug)
@@ -407,7 +407,7 @@ check_early_rng_type_switching (void)
if (initial >= GCRY_RNG_TYPE_SYSTEM && rngtype != GCRY_RNG_TYPE_SYSTEM)
die ("switching to System RNG failed\n");
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS));
rngtype = rng_type ();
if (debug)
@@ -415,7 +415,7 @@ check_early_rng_type_switching (void)
if (initial >= GCRY_RNG_TYPE_FIPS && rngtype != GCRY_RNG_TYPE_FIPS)
die ("switching to FIPS RNG failed\n");
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_STANDARD);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_STANDARD));
rngtype = rng_type ();
if (debug)
@@ -659,18 +659,18 @@ main (int argc, char **argv)
{
/* This is anyway the default, but we may want to use it for
debugging. */
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE,
- GCRY_RNG_TYPE_STANDARD);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE,
+ GCRY_RNG_TYPE_STANDARD));
argc--; argv++;
}
else if (!strcmp (*argv, "--prefer-fips-rng"))
{
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_FIPS));
argc--; argv++;
}
else if (!strcmp (*argv, "--prefer-system-rng"))
{
- xgcry_control (GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM);
+ xgcry_control ((GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM));
argc--; argv++;
}
else if (!strcmp (*argv, "--disable-hwf"))
@@ -701,7 +701,7 @@ main (int argc, char **argv)
check_early_rng_type_switching ();
}
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
@@ -718,9 +718,9 @@ main (int argc, char **argv)
xfree (fname);
}
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
if (benchmark)
{
@@ -760,7 +760,7 @@ main (int argc, char **argv)
}
if (debug)
- xgcry_control (GCRYCTL_DUMP_RANDOM_STATS);
+ xgcry_control ((GCRYCTL_DUMP_RANDOM_STATS));
return 0;
}
diff --git a/tests/rsacvt.c b/tests/rsacvt.c
index 3d832640f..3cc50d799 100644
--- a/tests/rsacvt.c
+++ b/tests/rsacvt.c
@@ -361,11 +361,11 @@ main (int argc, char **argv)
else
input = stdin;
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
if (!gcry_check_version ("1.4.0"))
die ("Libgcrypt is not sufficient enough\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
do
{
diff --git a/tests/t-common.h b/tests/t-common.h
index 2040f099e..e356c39ab 100644
--- a/tests/t-common.h
+++ b/tests/t-common.h
@@ -151,9 +151,9 @@ info (const char *format, ...)
/* Convenience macro for initializing gcrypt with error checking. */
-#define xgcry_control(cmd...) \
+#define xgcry_control(cmd) \
do { \
- gcry_error_t err__ = gcry_control (cmd); \
+ gcry_error_t err__ = gcry_control cmd; \
if (err__) \
die ("line %d: gcry_control (%s) failed: %s", \
__LINE__, #cmd, gcry_strerror (err__)); \
diff --git a/tests/t-convert.c b/tests/t-convert.c
index 121039c73..4450a9e3f 100644
--- a/tests/t-convert.c
+++ b/tests/t-convert.c
@@ -520,11 +520,11 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
negative_zero ();
check_formats ();
diff --git a/tests/t-cv25519.c b/tests/t-cv25519.c
index 8c4a53eb4..5634312d3 100644
--- a/tests/t-cv25519.c
+++ b/tests/t-cv25519.c
@@ -553,13 +553,13 @@ main (int argc, char **argv)
die ("unknown option '%s'", *argv);
}
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
start_timer ();
check_cv25519 ();
diff --git a/tests/t-ed25519.c b/tests/t-ed25519.c
index 73628a815..a5271c25d 100644
--- a/tests/t-ed25519.c
+++ b/tests/t-ed25519.c
@@ -473,13 +473,13 @@ main (int argc, char **argv)
else
custom_data_file = 1;
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
/* Ed25519 isn't supported in fips mode */
if (gcry_fips_mode_active())
diff --git a/tests/t-kdf.c b/tests/t-kdf.c
index e011ef4f1..7a48e98ac 100644
--- a/tests/t-kdf.c
+++ b/tests/t-kdf.c
@@ -1274,10 +1274,10 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
if (s2kcount)
bench_s2k (s2kcount);
diff --git a/tests/t-lock.c b/tests/t-lock.c
index 7e5732e09..9f30ec56d 100644
--- a/tests/t-lock.c
+++ b/tests/t-lock.c
@@ -429,15 +429,15 @@ main (int argc, char **argv)
srand (time(NULL)*getpid());
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch");
/* We are using non-public interfaces - check the exact version. */
if (strcmp (gcry_check_version (NULL), GCRYPT_VERSION))
die ("exact version match failed");
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
check_nonce_lock ();
diff --git a/tests/t-mpi-bit.c b/tests/t-mpi-bit.c
index 91116ca98..b66809f01 100644
--- a/tests/t-mpi-bit.c
+++ b/tests/t-mpi-bit.c
@@ -340,12 +340,12 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
one_bit_only (0);
one_bit_only (1);
diff --git a/tests/t-mpi-point.c b/tests/t-mpi-point.c
index f2378bffc..1ee1caf2c 100644
--- a/tests/t-mpi-point.c
+++ b/tests/t-mpi-point.c
@@ -1322,11 +1322,11 @@ main (int argc, char **argv)
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch\n");
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
set_get_point ();
context_alloc ();
diff --git a/tests/t-secmem.c b/tests/t-secmem.c
index baf013d3b..c4d8c66df 100644
--- a/tests/t-secmem.c
+++ b/tests/t-secmem.c
@@ -76,13 +76,13 @@ test_secmem_overflow (void)
{
a[i] = gcry_xmalloc_secure (chunk_size);
if (verbose && !(i %40))
- xgcry_control (GCRYCTL_DUMP_SECMEM_STATS, 0 , 0);
+ xgcry_control ((GCRYCTL_DUMP_SECMEM_STATS, 0 , 0));
}
if (debug)
- xgcry_control (PRIV_CTL_DUMP_SECMEM_STATS, 0 , 0);
+ xgcry_control ((PRIV_CTL_DUMP_SECMEM_STATS, 0 , 0));
if (verbose)
- xgcry_control (GCRYCTL_DUMP_SECMEM_STATS, 0 , 0);
+ xgcry_control ((GCRYCTL_DUMP_SECMEM_STATS, 0 , 0));
for (i=0; i < DIM(a); i++)
xfree (a[i]);
}
@@ -103,7 +103,7 @@ outofcore_handler (void *opaque, size_t req_n, unsigned int flags)
been_here = 1;
info ("outofcore handler invoked");
- xgcry_control (PRIV_CTL_DUMP_SECMEM_STATS, 0 , 0);
+ xgcry_control ((PRIV_CTL_DUMP_SECMEM_STATS, 0 , 0));
fail ("out of core%s while allocating %lu bytes",
(flags & 1)?" in secure memory":"", (unsigned long)req_n);
@@ -171,16 +171,16 @@ main (int argc, char **argv)
die ("version mismatch; pgm=%s, library=%s\n",
GCRYPT_VERSION, gcry_check_version (NULL));
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u , 0);
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- xgcry_control (GCRYCTL_INIT_SECMEM, pool_size, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u , 0));
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
+ xgcry_control ((GCRYCTL_INIT_SECMEM, pool_size, 0));
gcry_set_outofcore_handler (outofcore_handler, NULL);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
/* Libgcrypt prints a warning when the first overflow is allocated;
* we do not want to see that. */
if (!verbose)
- xgcry_control (GCRYCTL_DISABLE_SECMEM_WARN, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM_WARN, 0));
test_secmem ();
@@ -191,11 +191,11 @@ main (int argc, char **argv)
if (verbose)
{
- xgcry_control (PRIV_CTL_DUMP_SECMEM_STATS, 0 , 0);
- xgcry_control (GCRYCTL_DUMP_SECMEM_STATS, 0 , 0);
+ xgcry_control ((PRIV_CTL_DUMP_SECMEM_STATS, 0 , 0));
+ xgcry_control ((GCRYCTL_DUMP_SECMEM_STATS, 0 , 0));
}
info ("All tests completed. Errors: %d\n", error_count);
- xgcry_control (GCRYCTL_TERM_SECMEM, 0 , 0);
+ xgcry_control ((GCRYCTL_TERM_SECMEM, 0 , 0));
return !!error_count;
}
diff --git a/tests/t-sexp.c b/tests/t-sexp.c
index 2b33520f0..d45f44ae8 100644
--- a/tests/t-sexp.c
+++ b/tests/t-sexp.c
@@ -1169,17 +1169,17 @@ main (int argc, char **argv)
}
if (debug)
- xgcry_control (GCRYCTL_SET_DEBUG_FLAGS, 1u, 0);
- xgcry_control (GCRYCTL_DISABLE_SECMEM_WARN);
- xgcry_control (GCRYCTL_INIT_SECMEM, 16384, 0);
+ xgcry_control ((GCRYCTL_SET_DEBUG_FLAGS, 1u, 0));
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM_WARN));
+ xgcry_control ((GCRYCTL_INIT_SECMEM, 16384, 0));
if (!gcry_check_version (GCRYPT_VERSION))
die ("version mismatch");
/* #include "../src/gcrypt-int.h" indicates that internal interfaces
may be used; thus better do an exact version check. */
if (strcmp (gcry_check_version (NULL), GCRYPT_VERSION))
die ("exact version match failed");
- xgcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0);
- xgcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ xgcry_control ((GCRYCTL_ENABLE_QUICK_RANDOM, 0));
+ xgcry_control ((GCRYCTL_INITIALIZATION_FINISHED, 0));
basic ();
canon_len ();
diff --git a/tests/version.c b/tests/version.c
index 7e68cd605..1d540ba49 100644
--- a/tests/version.c
+++ b/tests/version.c
@@ -145,9 +145,9 @@ main (int argc, char **argv)
}
}
- xgcry_control (GCRYCTL_SET_VERBOSITY, (int)verbose);
+ xgcry_control ((GCRYCTL_SET_VERBOSITY, (int)verbose));
- xgcry_control (GCRYCTL_DISABLE_SECMEM, 0);
+ xgcry_control ((GCRYCTL_DISABLE_SECMEM, 0));
if (strcmp (GCRYPT_VERSION, gcry_check_version (NULL)))
{
int oops = !gcry_check_version (GCRYPT_VERSION);
@@ -157,7 +157,7 @@ main (int argc, char **argv)
exit (1);
}
- xgcry_control (GCRYCTL_PRINT_CONFIG, NULL);
+ xgcry_control ((GCRYCTL_PRINT_CONFIG, NULL));
test_get_config ();
More information about the Gcrypt-devel
mailing list