From 5bd05e579994c756cd994b5e0ff5f395aae6bfff Mon Sep 17 00:00:00 2001 From: Lingmo Zhu Date: Wed, 2 Aug 2017 20:55:40 +0800 Subject: [PATCH] remove horrible pragma macro and remove __owur from SSL_CTX_add_session() declaration Reviewed-by: Paul Dale Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/4014) --- include/openssl/ssl.h | 2 +- ssl/ssl_sess.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index c6349378c3..245f5eb172 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1559,7 +1559,7 @@ int SSL_SESSION_up_ref(SSL_SESSION *ses); void SSL_SESSION_free(SSL_SESSION *ses); __owur int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp); __owur int SSL_set_session(SSL *to, SSL_SESSION *session); -__owur int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c); +int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c); int SSL_CTX_remove_session(SSL_CTX *, SSL_SESSION *c); __owur int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB); __owur int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB); diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index a291ead92a..805a3d75f4 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -549,10 +549,7 @@ int ssl_get_prev_session(SSL *s, CLIENTHELLO_MSG *hello, int *al) * interrupt the session resumption process. The return * value is intentionally ignored. */ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-result" SSL_CTX_add_session(s->session_ctx, ret); -#pragma GCC diagnostic pop } } } -- 2.25.1