[PATCH 1 of 2] Style: added missing "static" specifiers

Maxim Dounin mdounin at mdounin.ru
Mon Sep 27 13:18:07 UTC 2021


# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1632717373 -10800
#      Mon Sep 27 07:36:13 2021 +0300
# Node ID 8f0fd60c33c106fba5f1ce3cafe990f15fcccc0c
# Parent  bfad703459b4e2416548ac66f548e96c2197d9cc
Style: added missing "static" specifiers.

Mostly found by gcc -Wtraditional, per "non-static declaration of ...
follows static declaration [-Wtraditional]" warnings.

diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -2767,7 +2767,7 @@ ngx_ssl_write(ngx_connection_t *c, u_cha
 
 #ifdef SSL_READ_EARLY_DATA_SUCCESS
 
-ssize_t
+static ssize_t
 ngx_ssl_write_early(ngx_connection_t *c, u_char *data, size_t size)
 {
     int        n, sslerr;
diff --git a/src/stream/ngx_stream_ssl_module.c b/src/stream/ngx_stream_ssl_module.c
--- a/src/stream/ngx_stream_ssl_module.c
+++ b/src/stream/ngx_stream_ssl_module.c
@@ -23,7 +23,8 @@ static ngx_int_t ngx_stream_ssl_init_con
     ngx_connection_t *c);
 static void ngx_stream_ssl_handshake_handler(ngx_connection_t *c);
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
-int ngx_stream_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg);
+static int ngx_stream_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad,
+    void *arg);
 #endif
 #ifdef SSL_R_CERT_CB_ERROR
 static int ngx_stream_ssl_certificate(ngx_ssl_conn_t *ssl_conn, void *arg);
@@ -434,7 +435,7 @@ ngx_stream_ssl_handshake_handler(ngx_con
 
 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME
 
-int
+static int
 ngx_stream_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg)
 {
     return SSL_TLSEXT_ERR_OK;
@@ -445,7 +446,7 @@ ngx_stream_ssl_servername(ngx_ssl_conn_t
 
 #ifdef SSL_R_CERT_CB_ERROR
 
-int
+static int
 ngx_stream_ssl_certificate(ngx_ssl_conn_t *ssl_conn, void *arg)
 {
     ngx_str_t                    cert, key;



More information about the nginx-devel mailing list