Add missing static specifiers

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


Hi all,

Wrote a small script to find missing 'static's in my module -
https://github.com/kaltura/nginx-vod-module/blob/master/test/test_static.py

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.

Thanks!

Eran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20170228/6ee7031d/attachment.html>
-------------- 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: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20170228/6ee7031d/attachment.obj>


More information about the nginx-devel mailing list