[nginx] Style: added missing "static" specifiers.

Maxim Dounin mdounin at mdounin.ru
Thu Oct 21 19:46:32 UTC 2021


details:   https://hg.nginx.org/nginx/rev/46a02ed7c966
branches:  
changeset: 7940:46a02ed7c966
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Thu Oct 21 18:43:13 2021 +0300
description:
Style: added missing "static" specifiers.

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

diffstat:

 src/event/ngx_event_openssl.c      |  2 +-
 src/stream/ngx_stream_ssl_module.c |  7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r 9e7de0547f09 -r 46a02ed7c966 src/event/ngx_event_openssl.c
--- a/src/event/ngx_event_openssl.c	Thu Oct 21 18:38:38 2021 +0300
+++ b/src/event/ngx_event_openssl.c	Thu Oct 21 18:43:13 2021 +0300
@@ -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 -r 9e7de0547f09 -r 46a02ed7c966 src/stream/ngx_stream_ssl_module.c
--- a/src/stream/ngx_stream_ssl_module.c	Thu Oct 21 18:38:38 2021 +0300
+++ b/src/stream/ngx_stream_ssl_module.c	Thu Oct 21 18:43:13 2021 +0300
@@ -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 TLSEXT_TYPE_application_layer_protocol_negotiation
 static int ngx_stream_ssl_alpn_select(ngx_ssl_conn_t *ssl_conn,
@@ -451,7 +452,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;
@@ -502,7 +503,7 @@ ngx_stream_ssl_alpn_select(ngx_ssl_conn_
 
 #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