From: Azat Khuzhin Date: Tue, 6 Dec 2016 10:26:09 +0000 (+0300) Subject: https-cilent: fix compilation warnings about unused vars/functions on win32 X-Git-Tag: release-2.1.8-stable~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=13a4acdae345e2d5be01b5d298c2ebb80fcb8e81;p=libevent https-cilent: fix compilation warnings about unused vars/functions on win32 --- diff --git a/sample/https-client.c b/sample/https-client.c index d9bf1908..74839565 100644 --- a/sample/https-client.c +++ b/sample/https-client.c @@ -119,6 +119,7 @@ err_openssl(const char *func) exit(1); } +#ifndef _WIN32 /* See http://archives.seul.org/libevent/users/Jan-2013/msg00039.html */ static int cert_verify_callback(X509_STORE_CTX *x509_ctx, void *arg) { @@ -181,6 +182,7 @@ static int cert_verify_callback(X509_STORE_CTX *x509_ctx, void *arg) return 0; } } +#endif int main(int argc, char **argv) @@ -366,7 +368,9 @@ main(int argc, char **argv) * "wrapping" OpenSSL's routine, not replacing it. */ SSL_CTX_set_cert_verify_callback(ssl_ctx, cert_verify_callback, (void *) host); -#endif // not _WIN32 +#else // _WIN32 + (void)crt; +#endif // _WIN32 // Create event base base = event_base_new();