From 94228f87fac465bcc3cb36efb8a43ef27554f7e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Mon, 17 Jan 2022 21:19:31 +0100 Subject: [PATCH] tests: Use inline function for dummy definition of test_randomize. --- ChangeLog | 2 ++ testsuite/testutils.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13866547..6061d820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ * testsuite/ecdsa-keygen-test.c (ecc_valid_p): ... old copy. * testsuite/gostdsa-keygen-test.c (ecc_valid_p): ... old copy. * testsuite/testutils.h: Declare it. + (test_randomize) [NETTLE_USE_MINI_GMP]: Use inline function rather + than macro for dummy definition, to avoid compile time warnings. 2022-01-10 Niels Möller diff --git a/testsuite/testutils.h b/testsuite/testutils.h index 385b9abc..cb4423e4 100644 --- a/testsuite/testutils.h +++ b/testsuite/testutils.h @@ -163,10 +163,11 @@ void gmp_randinit_default (struct knuth_lfib_ctx *ctx); void mpz_urandomb (mpz_t r, struct knuth_lfib_ctx *ctx, mp_bitcnt_t bits); /* This is cheating */ #define mpz_rrandomb mpz_urandomb -#define test_randomize(rands) 0 +static inline int +test_randomize (gmp_randstate_t rands UNUSED) { return 0; } #else /* !NETTLE_USE_MINI_GMP */ int -test_randomize(gmp_randstate_t rands); +test_randomize (gmp_randstate_t rands); #endif /* !NETTLE_USE_MINI_GMP */ -- 2.47.2