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) {