From 4255c4610195920ac3e53d8ea5b37a4386125c26 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 May 2021 08:25:15 +0200 Subject: make the compiler happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Depending on build flags the compiler complains: ykfde.c:307:3: error: ignoring return value of ‘getrandom’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] Let's add the return value to `len`, which is no longer used anyway. Fixes #33 --- bin/ykfde.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/ykfde.c b/bin/ykfde.c index 27aecc3..4460e48 100644 --- a/bin/ykfde.c +++ b/bin/ykfde.c @@ -304,7 +304,7 @@ int main(int argc, char **argv) { We generate an array of unsigned int, the use modulo to limit to printable ASCII characters (32 to 127). */ if ((len = getrandom(challenge_int, CHALLENGELEN * sizeof(unsigned int), GRND_RANDOM|GRND_NONBLOCK)) != CHALLENGELEN * sizeof(unsigned int)) - getrandom((void *)((size_t)challenge_int + len), CHALLENGELEN * sizeof(unsigned int) - len, 0); + len += getrandom((void *)((size_t)challenge_int + len), CHALLENGELEN * sizeof(unsigned int) - len, 0); for (i = 0; i < CHALLENGELEN; i++) challenge_new[i] = (challenge_int[i] % (127 - 32)) + 32; -- cgit v1.2.3-70-g09d2