From 0e030e901edb52d17d027631602df63b36d2b869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=BA=E9=97=B4=E6=B5=81=E6=B5=AA=E5=B0=91=E5=B9=B4?= Date: Thu, 5 Dec 2024 14:25:53 +0800 Subject: [PATCH] Update sm2_key.c and delete useles var to fix error error: ../../common/gmssl/src/sm2_key.c: In function 'sm2_public_key_to_der': ../../common/gmssl/src/sm2_key.c:110:9: error: unused variable 'len' [-Werror=unused-variable] size_t len = 0; ^~~ cc1: all warnings being treated as errors --- src/sm2_key.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sm2_key.c b/src/sm2_key.c index 94ebbb3f..ffbd69dc 100644 --- a/src/sm2_key.c +++ b/src/sm2_key.c @@ -89,7 +89,6 @@ int sm2_key_print(FILE *fp, int fmt, int ind, const char *label, const SM2_KEY * int sm2_public_key_to_der(const SM2_KEY *key, uint8_t **out, size_t *outlen) { uint8_t octets[65]; - size_t len = 0; if (!key) { return 0;