[nginx] Added missing static specifiers.

Maxim Dounin mdounin at mdounin.ru
Thu Mar 2 15:50:02 UTC 2017


details:   http://hg.nginx.org/nginx/rev/a72886067bbb
branches:  
changeset: 6922:a72886067bbb
user:      Eran Kornblau <erankor at gmail.com>
date:      Thu Mar 02 08:46:00 2017 -0500
description:
Added missing static specifiers.

diffstat:

 src/core/ngx_resolver.c                           |   8 +++---
 src/event/modules/ngx_devpoll_module.c            |   2 +-
 src/event/modules/ngx_epoll_module.c              |   2 +-
 src/event/modules/ngx_eventport_module.c          |   2 +-
 src/event/modules/ngx_iocp_module.c               |   2 +-
 src/event/modules/ngx_kqueue_module.c             |   2 +-
 src/event/modules/ngx_poll_module.c               |   4 +-
 src/event/modules/ngx_select_module.c             |   4 +-
 src/event/modules/ngx_win32_select_module.c       |   4 +-
 src/event/ngx_event.c                             |  30 +++++++++++-----------
 src/http/modules/ngx_http_charset_filter_module.c |   2 +-
 src/http/modules/ngx_http_gzip_static_module.c    |   2 +-
 src/http/modules/ngx_http_static_module.c         |   2 +-
 src/http/modules/ngx_http_xslt_filter_module.c    |   2 +-
 src/http/ngx_http_upstream.c                      |   2 +-
 15 files changed, 35 insertions(+), 35 deletions(-)

diffs (244 lines):

diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -56,8 +56,8 @@ typedef struct {
         ((u_char *) (n) - offsetof(ngx_resolver_node_t, node))
 
 
-ngx_int_t ngx_udp_connect(ngx_resolver_connection_t *rec);
-ngx_int_t ngx_tcp_connect(ngx_resolver_connection_t *rec);
+static ngx_int_t ngx_udp_connect(ngx_resolver_connection_t *rec);
+static ngx_int_t ngx_tcp_connect(ngx_resolver_connection_t *rec);
 
 
 static void ngx_resolver_cleanup(void *data);
@@ -4379,7 +4379,7 @@ ngx_resolver_log_error(ngx_log_t *log, u
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_udp_connect(ngx_resolver_connection_t *rec)
 {
     int                rc;
@@ -4463,7 +4463,7 @@ failed:
 }
 
 
-ngx_int_t
+static ngx_int_t
 ngx_tcp_connect(ngx_resolver_connection_t *rec)
 {
     int                rc;
diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c
--- a/src/event/modules/ngx_devpoll_module.c
+++ b/src/event/modules/ngx_devpoll_module.c
@@ -78,7 +78,7 @@ static ngx_command_t  ngx_devpoll_comman
 };
 
 
-ngx_event_module_t  ngx_devpoll_module_ctx = {
+static ngx_event_module_t  ngx_devpoll_module_ctx = {
     &devpoll_name,
     ngx_devpoll_create_conf,               /* create configuration */
     ngx_devpoll_init_conf,                 /* init configuration */
diff --git a/src/event/modules/ngx_epoll_module.c b/src/event/modules/ngx_epoll_module.c
--- a/src/event/modules/ngx_epoll_module.c
+++ b/src/event/modules/ngx_epoll_module.c
@@ -176,7 +176,7 @@ static ngx_command_t  ngx_epoll_commands
 };
 
 
-ngx_event_module_t  ngx_epoll_module_ctx = {
+static ngx_event_module_t  ngx_epoll_module_ctx = {
     &epoll_name,
     ngx_epoll_create_conf,               /* create configuration */
     ngx_epoll_init_conf,                 /* init configuration */
diff --git a/src/event/modules/ngx_eventport_module.c b/src/event/modules/ngx_eventport_module.c
--- a/src/event/modules/ngx_eventport_module.c
+++ b/src/event/modules/ngx_eventport_module.c
@@ -169,7 +169,7 @@ static ngx_command_t  ngx_eventport_comm
 };
 
 
-ngx_event_module_t  ngx_eventport_module_ctx = {
+static ngx_event_module_t  ngx_eventport_module_ctx = {
     &eventport_name,
     ngx_eventport_create_conf,             /* create configuration */
     ngx_eventport_init_conf,               /* init configuration */
diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c
--- a/src/event/modules/ngx_iocp_module.c
+++ b/src/event/modules/ngx_iocp_module.c
@@ -52,7 +52,7 @@ static ngx_command_t  ngx_iocp_commands[
 };
 
 
-ngx_event_module_t  ngx_iocp_module_ctx = {
+static ngx_event_module_t  ngx_iocp_module_ctx = {
     &iocp_name,
     ngx_iocp_create_conf,                  /* create configuration */
     ngx_iocp_init_conf,                    /* init configuration */
diff --git a/src/event/modules/ngx_kqueue_module.c b/src/event/modules/ngx_kqueue_module.c
--- a/src/event/modules/ngx_kqueue_module.c
+++ b/src/event/modules/ngx_kqueue_module.c
@@ -73,7 +73,7 @@ static ngx_command_t  ngx_kqueue_command
 };
 
 
-ngx_event_module_t  ngx_kqueue_module_ctx = {
+static ngx_event_module_t  ngx_kqueue_module_ctx = {
     &kqueue_name,
     ngx_kqueue_create_conf,                /* create configuration */
     ngx_kqueue_init_conf,                  /* init configuration */
diff --git a/src/event/modules/ngx_poll_module.c b/src/event/modules/ngx_poll_module.c
--- a/src/event/modules/ngx_poll_module.c
+++ b/src/event/modules/ngx_poll_module.c
@@ -25,9 +25,9 @@ static struct pollfd  *event_list;
 static ngx_uint_t      nevents;
 
 
-static ngx_str_t    poll_name = ngx_string("poll");
+static ngx_str_t           poll_name = ngx_string("poll");
 
-ngx_event_module_t  ngx_poll_module_ctx = {
+static ngx_event_module_t  ngx_poll_module_ctx = {
     &poll_name,
     NULL,                                  /* create configuration */
     ngx_poll_init_conf,                    /* init configuration */
diff --git a/src/event/modules/ngx_select_module.c b/src/event/modules/ngx_select_module.c
--- a/src/event/modules/ngx_select_module.c
+++ b/src/event/modules/ngx_select_module.c
@@ -33,9 +33,9 @@ static ngx_uint_t     nevents;
 static ngx_event_t  **event_index;
 
 
-static ngx_str_t    select_name = ngx_string("select");
+static ngx_str_t           select_name = ngx_string("select");
 
-ngx_event_module_t  ngx_select_module_ctx = {
+static ngx_event_module_t  ngx_select_module_ctx = {
     &select_name,
     NULL,                                  /* create configuration */
     ngx_select_init_conf,                  /* init configuration */
diff --git a/src/event/modules/ngx_win32_select_module.c b/src/event/modules/ngx_win32_select_module.c
--- a/src/event/modules/ngx_win32_select_module.c
+++ b/src/event/modules/ngx_win32_select_module.c
@@ -34,9 +34,9 @@ static ngx_uint_t     nevents;
 static ngx_event_t  **event_index;
 
 
-static ngx_str_t    select_name = ngx_string("select");
+static ngx_str_t           select_name = ngx_string("select");
 
-ngx_event_module_t  ngx_select_module_ctx = {
+static ngx_event_module_t  ngx_select_module_ctx = {
     &select_name,
     NULL,                                  /* create configuration */
     ngx_select_init_conf,                  /* init configuration */
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -59,20 +59,20 @@ ngx_int_t             ngx_accept_disable
 
 #if (NGX_STAT_STUB)
 
-ngx_atomic_t   ngx_stat_accepted0;
-ngx_atomic_t  *ngx_stat_accepted = &ngx_stat_accepted0;
-ngx_atomic_t   ngx_stat_handled0;
-ngx_atomic_t  *ngx_stat_handled = &ngx_stat_handled0;
-ngx_atomic_t   ngx_stat_requests0;
-ngx_atomic_t  *ngx_stat_requests = &ngx_stat_requests0;
-ngx_atomic_t   ngx_stat_active0;
-ngx_atomic_t  *ngx_stat_active = &ngx_stat_active0;
-ngx_atomic_t   ngx_stat_reading0;
-ngx_atomic_t  *ngx_stat_reading = &ngx_stat_reading0;
-ngx_atomic_t   ngx_stat_writing0;
-ngx_atomic_t  *ngx_stat_writing = &ngx_stat_writing0;
-ngx_atomic_t   ngx_stat_waiting0;
-ngx_atomic_t  *ngx_stat_waiting = &ngx_stat_waiting0;
+static ngx_atomic_t   ngx_stat_accepted0;
+ngx_atomic_t         *ngx_stat_accepted = &ngx_stat_accepted0;
+static ngx_atomic_t   ngx_stat_handled0;
+ngx_atomic_t         *ngx_stat_handled = &ngx_stat_handled0;
+static ngx_atomic_t   ngx_stat_requests0;
+ngx_atomic_t         *ngx_stat_requests = &ngx_stat_requests0;
+static ngx_atomic_t   ngx_stat_active0;
+ngx_atomic_t         *ngx_stat_active = &ngx_stat_active0;
+static ngx_atomic_t   ngx_stat_reading0;
+ngx_atomic_t         *ngx_stat_reading = &ngx_stat_reading0;
+static ngx_atomic_t   ngx_stat_writing0;
+ngx_atomic_t         *ngx_stat_writing = &ngx_stat_writing0;
+static ngx_atomic_t   ngx_stat_waiting0;
+ngx_atomic_t         *ngx_stat_waiting = &ngx_stat_waiting0;
 
 #endif
 
@@ -165,7 +165,7 @@ static ngx_command_t  ngx_event_core_com
 };
 
 
-ngx_event_module_t  ngx_event_core_module_ctx = {
+static ngx_event_module_t  ngx_event_core_module_ctx = {
     &event_core_name,
     ngx_event_core_create_conf,            /* create configuration */
     ngx_event_core_init_conf,              /* init configuration */
diff --git a/src/http/modules/ngx_http_charset_filter_module.c b/src/http/modules/ngx_http_charset_filter_module.c
--- a/src/http/modules/ngx_http_charset_filter_module.c
+++ b/src/http/modules/ngx_http_charset_filter_module.c
@@ -123,7 +123,7 @@ static char *ngx_http_charset_merge_loc_
 static ngx_int_t ngx_http_charset_postconfiguration(ngx_conf_t *cf);
 
 
-ngx_str_t  ngx_http_charset_default_types[] = {
+static ngx_str_t  ngx_http_charset_default_types[] = {
     ngx_string("text/html"),
     ngx_string("text/xml"),
     ngx_string("text/plain"),
diff --git a/src/http/modules/ngx_http_gzip_static_module.c b/src/http/modules/ngx_http_gzip_static_module.c
--- a/src/http/modules/ngx_http_gzip_static_module.c
+++ b/src/http/modules/ngx_http_gzip_static_module.c
@@ -48,7 +48,7 @@ static ngx_command_t  ngx_http_gzip_stat
 };
 
 
-ngx_http_module_t  ngx_http_gzip_static_module_ctx = {
+static ngx_http_module_t  ngx_http_gzip_static_module_ctx = {
     NULL,                                  /* preconfiguration */
     ngx_http_gzip_static_init,             /* postconfiguration */
 
diff --git a/src/http/modules/ngx_http_static_module.c b/src/http/modules/ngx_http_static_module.c
--- a/src/http/modules/ngx_http_static_module.c
+++ b/src/http/modules/ngx_http_static_module.c
@@ -14,7 +14,7 @@ static ngx_int_t ngx_http_static_handler
 static ngx_int_t ngx_http_static_init(ngx_conf_t *cf);
 
 
-ngx_http_module_t  ngx_http_static_module_ctx = {
+static ngx_http_module_t  ngx_http_static_module_ctx = {
     NULL,                                  /* preconfiguration */
     ngx_http_static_init,                  /* postconfiguration */
 
diff --git a/src/http/modules/ngx_http_xslt_filter_module.c b/src/http/modules/ngx_http_xslt_filter_module.c
--- a/src/http/modules/ngx_http_xslt_filter_module.c
+++ b/src/http/modules/ngx_http_xslt_filter_module.c
@@ -109,7 +109,7 @@ static ngx_int_t ngx_http_xslt_filter_in
 static void ngx_http_xslt_filter_exit(ngx_cycle_t *cycle);
 
 
-ngx_str_t  ngx_http_xslt_default_types[] = {
+static ngx_str_t  ngx_http_xslt_default_types[] = {
     ngx_string("text/xml"),
     ngx_null_string
 };
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -188,7 +188,7 @@ static ngx_int_t ngx_http_upstream_ssl_n
 #endif
 
 
-ngx_http_upstream_header_t  ngx_http_upstream_headers_in[] = {
+static ngx_http_upstream_header_t  ngx_http_upstream_headers_in[] = {
 
     { ngx_string("Status"),
                  ngx_http_upstream_process_header_line,


More information about the nginx-devel mailing list