Add missing static specifiers

Eran Kornblau eran.kornblau at
Tue Feb 28 19:20:49 UTC 2017

Hi all,

Wrote a small script to find missing 'static's in my module -

I executed it on nginx core and found a few of those too, see attached patch.
The logic for finding these was -

1.       An exported symbol (found by running readelf on all object files)

2.       Appears only in one source file (I could have checked the object imports instead, but anyway,
that's how it works...)

3.       Not mentioned in any header file (simple 'find whole words' search)

4.       Does not end with '_module'

Btw, the script also complained about ngx_noaccepting and ngx_restart, I did not change those since
all other flags there are exported.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-add-static.patch
Type: application/octet-stream
Size: 3845 bytes
Desc: nginx-add-static.patch
URL: <>

More information about the nginx-devel mailing list