Fix minor compiler issues.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3220)
diff --git a/ssl/record/ssl3_record_tls13.c b/ssl/record/ssl3_record_tls13.c
index c6ea511..9e65852 100644
--- a/ssl/record/ssl3_record_tls13.c
+++ b/ssl/record/ssl3_record_tls13.c
@@ -21,7 +21,7 @@
  *   -1: if the record's AEAD-authenticator is invalid or, if sending,
  *       an internal error occurred.
  */
-int tls13_enc(SSL *s, SSL3_RECORD *recs, size_t n_recs, int send)
+int tls13_enc(SSL *s, SSL3_RECORD *recs, size_t n_recs, int sending)
 {
     EVP_CIPHER_CTX *ctx;
     unsigned char iv[EVP_MAX_IV_LENGTH];
@@ -38,7 +38,7 @@
         return -1;
     }
 
-    if (send) {
+    if (sending) {
         ctx = s->enc_write_ctx;
         staticiv = s->write_iv;
         seq = RECORD_LAYER_get_write_sequence(&s->rlayer);
@@ -75,7 +75,7 @@
             taglen = EVP_CCM8_TLS_TAG_LEN;
          else
             taglen = EVP_CCM_TLS_TAG_LEN;
-         if (send && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, taglen,
+         if (sending && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, taglen,
                                          NULL) <= 0)
             return -1;
     } else if (alg_enc & SSL_AESGCM) {
@@ -86,7 +86,7 @@
         return -1;
     }
 
-    if (!send) {
+    if (!sending) {
         /*
          * Take off tag. There must be at least one byte of content type as
          * well as the tag
@@ -118,8 +118,8 @@
     }
 
     /* TODO(size_t): lenu/lenf should be a size_t but EVP doesn't support it */
-    if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, iv, send) <= 0
-            || (!send && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG,
+    if (EVP_CipherInit_ex(ctx, NULL, NULL, NULL, iv, sending) <= 0
+            || (!sending && EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG,
                                              taglen,
                                              rec->data + rec->length) <= 0)
             || EVP_CipherUpdate(ctx, rec->data, &lenu, rec->input,
@@ -128,7 +128,7 @@
             || (size_t)(lenu + lenf) != rec->length) {
         return -1;
     }
-    if (send) {
+    if (sending) {
         /* Add the tag */
         if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_GET_TAG, taglen,
                                 rec->data + rec->length) <= 0)
diff --git a/ssl/statem/extensions_srvr.c b/ssl/statem/extensions_srvr.c
index da7e8c8..7ba1aac 100644
--- a/ssl/statem/extensions_srvr.c
+++ b/ssl/statem/extensions_srvr.c
@@ -780,7 +780,7 @@
      * client's due to the network latency). Therefore we add 1000ms to our age
      * calculation to adjust for rounding errors.
      */
-    if (sess->timeout >= agesec
+    if (sess->timeout >= (long)agesec
             && agems / (uint32_t)1000 == agesec
             && ticket_age <= agems + 1000
             && ticket_age + TICKET_AGE_ALLOWANCE >= agems + 1000) {
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c
index 92a0e8f..e63d0ad 100644
--- a/ssl/statem/statem.c
+++ b/ssl/statem/statem.c
@@ -172,13 +172,13 @@
  * Called when we are in SSL_read*(), SSL_write*(), or SSL_accept()
  * /SSL_connect()/SSL_do_handshake(). Used to test whether we are in an early
  * data state and whether we should attempt to move the handshake on if so.
- * |send| is 1 if we are attempting to send data (SSL_write*()), 0 if we are
+ * |sending| is 1 if we are attempting to send data (SSL_write*()), 0 if we are
  * attempting to read data (SSL_read*()), or -1 if we are in SSL_do_handshake()
  * or similar.
  */
-void ossl_statem_check_finish_init(SSL *s, int send)
+void ossl_statem_check_finish_init(SSL *s, int sending)
 {
-    if (send == -1) {
+    if (sending == -1) {
         if (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
                 || s->statem.hand_state == TLS_ST_EARLY_DATA) {
             ossl_statem_set_in_init(s, 1);
@@ -191,16 +191,16 @@
             }
         }
     } else if (!s->server) {
-        if ((send && (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
+        if ((sending && (s->statem.hand_state == TLS_ST_PENDING_EARLY_DATA_END
                       || s->statem.hand_state == TLS_ST_EARLY_DATA)
                   && s->early_data_state != SSL_EARLY_DATA_WRITING)
-                || (!send && s->statem.hand_state == TLS_ST_EARLY_DATA)) {
+                || (!sending && s->statem.hand_state == TLS_ST_EARLY_DATA)) {
             ossl_statem_set_in_init(s, 1);
             /*
              * SSL_write() has been called directly. We don't allow any more
              * writing of early data.
              */
-            if (send && s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY)
+            if (sending && s->early_data_state == SSL_EARLY_DATA_WRITE_RETRY)
                 s->early_data_state = SSL_EARLY_DATA_FINISHED_WRITING;
         }
     } else {
diff --git a/ssl/tls13_enc.c b/ssl/tls13_enc.c
index 2ae4552..9030d1a2 100644
--- a/ssl/tls13_enc.c
+++ b/ssl/tls13_enc.c
@@ -267,7 +267,7 @@
     return 1;
 }
 
-static int derive_secret_key_and_iv(SSL *s, int send, const EVP_MD *md,
+static int derive_secret_key_and_iv(SSL *s, int sending, const EVP_MD *md,
                                     const EVP_CIPHER *ciph,
                                     const unsigned char *insecret,
                                     const unsigned char *hash,
@@ -312,7 +312,7 @@
         goto err;
     }
 
-    if (EVP_CipherInit_ex(ciph_ctx, ciph, NULL, NULL, NULL, send) <= 0
+    if (EVP_CipherInit_ex(ciph_ctx, ciph, NULL, NULL, NULL, sending) <= 0
         || !EVP_CIPHER_CTX_ctrl(ciph_ctx, EVP_CTRL_AEAD_SET_IVLEN, ivlen, NULL)
         || (taglen != 0 && !EVP_CIPHER_CTX_ctrl(ciph_ctx, EVP_CTRL_AEAD_SET_TAG,
                                                 taglen, NULL))
@@ -323,7 +323,7 @@
 
 #ifdef OPENSSL_SSL_TRACE_CRYPTO
     if (s->msg_callback) {
-        int wh = send ? TLS1_RT_CRYPTO_WRITE : 0;
+        int wh = sending ? TLS1_RT_CRYPTO_WRITE : 0;
 
         if (ciph->key_len)
             s->msg_callback(2, s->version, wh | TLS1_RT_CRYPTO_KEY,
@@ -557,7 +557,7 @@
     return ret;
 }
 
-int tls13_update_key(SSL *s, int send)
+int tls13_update_key(SSL *s, int sending)
 {
     static const unsigned char application_traffic[] =
         "application traffic secret";
@@ -568,12 +568,12 @@
     EVP_CIPHER_CTX *ciph_ctx;
     int ret = 0;
 
-    if (s->server == send)
+    if (s->server == sending)
         insecret = s->server_app_traffic_secret;
     else
         insecret = s->client_app_traffic_secret;
 
-    if (send) {
+    if (sending) {
         iv = s->write_iv;
         ciph_ctx = s->enc_write_ctx;
         RECORD_LAYER_reset_write_sequence(&s->rlayer);
@@ -583,7 +583,7 @@
         RECORD_LAYER_reset_read_sequence(&s->rlayer);
     }
 
-    if (!derive_secret_key_and_iv(s, send, ssl_handshake_md(s),
+    if (!derive_secret_key_and_iv(s, sending, ssl_handshake_md(s),
                                   s->s3->tmp.new_sym_enc, insecret, NULL,
                                   application_traffic,
                                   sizeof(application_traffic) - 1, secret, iv,