From: Amos Jeffries Date: Sun, 2 Jun 2013 15:50:00 +0000 (-0600) Subject: basic_ncsa_auth: fix unused variable warnings (typo in rev.12762) X-Git-Tag: SQUID_3_3_6~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=65db5a9944ee19a4bafda9c7eed9902c353bd420;p=thirdparty%2Fsquid.git basic_ncsa_auth: fix unused variable warnings (typo in rev.12762) When libcrypto is absent the passwordLength variable becomes unused. Detected by Windows build farm node. --- diff --git a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc index 988f625a5d..c65330e8da 100644 --- a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc +++ b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc @@ -149,8 +149,8 @@ main(int argc, char **argv) continue; } char *crypted = NULL; - size_t passwordLength = strlen(passwd); #if HAVE_CRYPT + size_t passwordLength = strlen(passwd); // Bug 3831: given algorithms more secure than DES crypt() does not truncate, so we can ignore the bug 3107 length checks below // '$1$' = MD5, '$2a$' = Blowfish, '$5$' = SHA256 (Linux), '$6$' = SHA256 (BSD) and SHA512 if (passwordLength > 1 && u->passwd[0] == '$' &&