From: W.C.A. Wijngaards Date: Wed, 1 Nov 2023 16:09:37 +0000 (+0100) Subject: - Fix compilation without openssl, remove unused function warning. X-Git-Tag: release-1.19.0rc1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4d17dd23187505dcdea580262961a680bc52047;p=thirdparty%2Funbound.git - Fix compilation without openssl, remove unused function warning. --- diff --git a/doc/Changelog b/doc/Changelog index 9a3c093a9..141f59b13 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -6,6 +6,7 @@ - Fix SSL compile failure for definition in log_crypto_err_io_code_arg. - Fix SSL compile failure for other missing definitions in log_crypto_err_io_code_arg. + - Fix compilation without openssl, remove unused function warning. 31 October 2023: George - Fix #941: dnscrypt doesn't work after upgrade to 1.18 with diff --git a/util/net_help.c b/util/net_help.c index e5b485c1c..897024792 100644 --- a/util/net_help.c +++ b/util/net_help.c @@ -952,11 +952,11 @@ void log_crypto_err_code(const char* str, unsigned long err) #endif /* HAVE_SSL */ } +#ifdef HAVE_SSL /** Print crypt erro with SSL_get_error want code and err_get_error code */ static void log_crypto_err_io_code_arg(const char* str, int r, unsigned long err, int err_present) { -#ifdef HAVE_SSL int print_errno = 0, print_crypto_err = 0; const char* inf = NULL; @@ -1033,13 +1033,8 @@ static void log_crypto_err_io_code_arg(const char* str, int r, log_err("str: %s", inf); } } -#else - (void)str; - (void)r; - (void)err; - (void)err_present; -#endif /* HAVE_SSL */ } +#endif /* HAVE_SSL */ void log_crypto_err_io(const char* str, int r) {