remove horrible pragma macro and remove __owur from SSL_CTX_add_session() declaration
authorLingmo Zhu <zlm2006@gmail.com>
Wed, 2 Aug 2017 12:55:40 +0000 (20:55 +0800)
committerMatt Caswell <matt@openssl.org>
Thu, 3 Aug 2017 09:23:08 +0000 (10:23 +0100)
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4014)

(cherry picked from commit 5bd05e579994c756cd994b5e0ff5f395aae6bfff)

include/openssl/ssl.h
ssl/ssl_sess.c

index 6f0f361d7e6c05a24c67ffb2ab4c0be21ee7ff6d..2c694b47353b33f10ffa713b2838b87d49e86b33 100644 (file)
@@ -1444,7 +1444,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);
index 8fd5f396aa82658414e8563306eea09cc98127d4..f0274cf29605502bafee1453192b58369ed644c5 100644 (file)
@@ -535,10 +535,7 @@ int ssl_get_prev_session(SSL *s, const PACKET *ext, const PACKET *session_id)
                  * 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
             }
         }
     }