[PATCH 1/8] rsatoc: fix compiler warnings

Sascha Hauer s.hauer at pengutronix.de
Wed May 4 06:14:09 PDT 2022


Fixes:

scripts/rsatoc.c:189:5: warning: no previous prototype for ‘rsa_get_params’ [-Wmissing-prototypes]

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 scripts/rsatoc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/rsatoc.c b/scripts/rsatoc.c
index f2d91b8e0d..722c5dba19 100644
--- a/scripts/rsatoc.c
+++ b/scripts/rsatoc.c
@@ -184,8 +184,8 @@ cleanup:
 /*
  * rsa_get_params(): - Get the important parameters of an RSA public key
  */
-int rsa_get_params(RSA *key, uint64_t *exponent, uint32_t *n0_invp,
-		   BIGNUM **modulusp, BIGNUM **r_squaredp)
+static int rsa_get_params(RSA *key, uint64_t *exponent, uint32_t *n0_invp,
+			  BIGNUM **modulusp, BIGNUM **r_squaredp)
 {
 	BIGNUM *big1, *big2, *big32, *big2_32;
 	BIGNUM *n, *r, *r_squared, *tmp;
@@ -359,7 +359,7 @@ static int print_bignum(BIGNUM *num, int num_bits)
 static int gen_key(const char *keyname, const char *path)
 {
 	BIGNUM *modulus, *r_squared;
-	uint64_t exponent;
+	uint64_t exponent = 0;
 	uint32_t n0_inv;
 	int ret;
 	int bits;
-- 
2.30.2




More information about the barebox mailing list