[PATCH] remove warnings for unused variables

Marcus Folkesson marcus.folkesson at gmail.com
Sun Oct 29 04:48:58 AEDT 2017


cipher.c: In function ‘cipher_get_keyiv’:
cipher.c:452:26: warning: unused variable ‘c’ [-Wunused-variable]
  const struct sshcipher *c = cc->cipher;
                            ^
cipher.c: In function ‘cipher_set_keyiv’:
cipher.c:497:26: warning: unused variable ‘c’ [-Wunused-variable]
  const struct sshcipher *c = cc->cipher;

Signed-off-by: Marcus Folkesson <marcus.folkesson at gmail.com>
---
 cipher.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cipher.c b/cipher.c
index c3cd5dcf..349ddfb0 100644
--- a/cipher.c
+++ b/cipher.c
@@ -449,8 +449,8 @@ cipher_get_keyiv_len(const struct sshcipher_ctx *cc)
 int
 cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
 {
-	const struct sshcipher *c = cc->cipher;
 #ifdef WITH_OPENSSL
+	const struct sshcipher *c = cc->cipher;
  	int evplen;
 #endif
 
@@ -494,8 +494,8 @@ cipher_get_keyiv(struct sshcipher_ctx *cc, u_char *iv, u_int len)
 int
 cipher_set_keyiv(struct sshcipher_ctx *cc, const u_char *iv)
 {
-	const struct sshcipher *c = cc->cipher;
 #ifdef WITH_OPENSSL
+	const struct sshcipher *c = cc->cipher;
  	int evplen = 0;
 #endif
 
-- 
2.13.1



More information about the openssh-unix-dev mailing list