54 lines
1.4 KiB
Diff
54 lines
1.4 KiB
Diff
From 370e252c6caedf561c832fa19b20abb7e249b326 Mon Sep 17 00:00:00 2001
|
|
From: Vladis Dronov <vdronov@redhat.com>
|
|
Date: Fri, 25 Mar 2022 12:41:45 +0100
|
|
Subject: [PATCH] Drop unused variables
|
|
Content-type: text/plain
|
|
|
|
And brush up code a bit. Unused variables are reported by gcc as:
|
|
|
|
rngd_darn.c: In function 'init_openssl':
|
|
rngd_darn.c:68:13: warning: unused variable 'i' [-Wunused-variable]
|
|
68 | int i;
|
|
rngd_darn.c: In function 'xread_darn':
|
|
rngd_darn.c:163:19: warning: unused variable 'darn_ptr' [-Wunused-variable]
|
|
163 | uint64_t *darn_ptr =(uint64_t *)buf;
|
|
|
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
|
---
|
|
rngd_darn.c | 5 +----
|
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
|
diff --git rngd_darn.c rngd_darn.c
|
|
index 5254195..7b26cbe 100644
|
|
--- rngd_darn.c
|
|
+++ rngd_darn.c
|
|
@@ -65,7 +65,6 @@ static size_t rand_bytes_served = 0;
|
|
static int init_openssl(struct rng *ent_src)
|
|
{
|
|
uint64_t darn_val;
|
|
- int i;
|
|
|
|
ossl_aes_random_key(key, NULL);
|
|
|
|
@@ -140,8 +139,7 @@ static size_t copy_avail_rand_to_buf(unsigned char *buf, size_t size, size_t cop
|
|
*/
|
|
static uint64_t get_darn()
|
|
{
|
|
- uint64_t darn_val;
|
|
- darn_val = 0;
|
|
+ uint64_t darn_val = 0;
|
|
int i;
|
|
|
|
/*
|
|
@@ -160,7 +158,6 @@ static uint64_t get_darn()
|
|
|
|
int xread_darn(void *buf, size_t size, struct rng *ent_src)
|
|
{
|
|
- uint64_t *darn_ptr =(uint64_t *)buf;
|
|
size_t copied = 0;
|
|
|
|
while (copied < size) {
|
|
--
|
|
2.35.1
|
|
|