Commit fb29212f authored by Thomas Haller's avatar Thomas Haller

libnm-util/crypto: fix harmless compiler warning

  libnm-util/crypto_gnutls.c: In function crypto_encrypt:
  libnm-util/crypto_gnutls.c:245:8: error: variable salt_len set but not used [-Werror=unused-but-set-variable]
    gsize salt_len;
          ^~~~~~~~

See-also: 312c72f7
parent 0aff056a
......@@ -242,15 +242,12 @@ crypto_encrypt (const char *cipher,
gsize padded_buf_len, pad_len, output_len;
char *padded_buf = NULL;
guint32 i;
gsize salt_len;
if (!strcmp (cipher, CIPHER_DES_EDE3_CBC)) {
if (!strcmp (cipher, CIPHER_DES_EDE3_CBC))
cipher_mech = GNUTLS_CIPHER_3DES_CBC;
salt_len = SALT_LEN;
} else if (!strcmp (cipher, CIPHER_AES_CBC)) {
else if (!strcmp (cipher, CIPHER_AES_CBC))
cipher_mech = GNUTLS_CIPHER_AES_128_CBC;
salt_len = iv_len;
} else {
else {
g_set_error (error, NM_CRYPTO_ERROR,
NM_CRYPTO_ERR_UNKNOWN_CIPHER,
_("Private key cipher '%s' was unknown."),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment