Add missing static specifiers
Maxim Dounin
mdounin at mdounin.ru
Thu Mar 2 00:38:52 UTC 2017
Hello!
On Tue, Feb 28, 2017 at 09:20:37PM +0000, Eran Kornblau wrote:
[...]
> > > diff -r 8b7fd958c59f -r 4b4b8f5413a4 src/os/unix/ngx_linux_init.c
> > > --- a/src/os/unix/ngx_linux_init.c Mon Feb 27 22:36:15 2017 +0300
> > > +++ b/src/os/unix/ngx_linux_init.c Tue Feb 28 11:49:07 2017 -0500
> > > @@ -9,8 +9,8 @@
> > > #include <ngx_core.h>
> > >
> > >
> > > -u_char ngx_linux_kern_ostype[50];
> > > -u_char ngx_linux_kern_osrelease[50];
> > > +static u_char ngx_linux_kern_ostype[50]; static u_char
> > > +ngx_linux_kern_osrelease[50];
> >
> > There are various OS-specific variables for various other
> > platforms as well. It would be a good idea to either review
> > them all, or left them as is.
> >
> Only one I could find is SERVICE_TABLE_ENTRY st (went over win32
> files manually)
> Added it
Looking into ngx_freebsd_init.c will show multiple similar
variables (with some of them actually exported), the same in
ngx_solaris_init.c, ngx_darwin_init.c, ngx_posix_init.c. It might
be better idea to just avoid changing this part for now.
[...]
> diff -r 8b7fd958c59f -r 050f8b3c3c67 src/event/ngx_event.c
> --- a/src/event/ngx_event.c Mon Feb 27 22:36:15 2017 +0300
> +++ b/src/event/ngx_event.c Tue Feb 28 16:06:25 2017 -0500
> @@ -59,19 +59,19 @@
>
> #if (NGX_STAT_STUB)
>
> -ngx_atomic_t ngx_stat_accepted0;
> +static ngx_atomic_t ngx_stat_accepted0;
> ngx_atomic_t *ngx_stat_accepted = &ngx_stat_accepted0;
> -ngx_atomic_t ngx_stat_handled0;
> +static ngx_atomic_t ngx_stat_handled0;
> ngx_atomic_t *ngx_stat_handled = &ngx_stat_handled0;
> -ngx_atomic_t ngx_stat_requests0;
> +static ngx_atomic_t ngx_stat_requests0;
> ngx_atomic_t *ngx_stat_requests = &ngx_stat_requests0;
> -ngx_atomic_t ngx_stat_active0;
> +static ngx_atomic_t ngx_stat_active0;
> ngx_atomic_t *ngx_stat_active = &ngx_stat_active0;
> -ngx_atomic_t ngx_stat_reading0;
> +static ngx_atomic_t ngx_stat_reading0;
> ngx_atomic_t *ngx_stat_reading = &ngx_stat_reading0;
> -ngx_atomic_t ngx_stat_writing0;
> +static ngx_atomic_t ngx_stat_writing0;
> ngx_atomic_t *ngx_stat_writing = &ngx_stat_writing0;
> -ngx_atomic_t ngx_stat_waiting0;
> +static ngx_atomic_t ngx_stat_waiting0;
> ngx_atomic_t *ngx_stat_waiting = &ngx_stat_waiting0;
This certainly needs additional changes to match style. Variable
names in a single block are expected to be lined up.
[...]
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list