[PATCH] Fix build with -Wmissing-prototypes

Ruslan Ermilov ru at nginx.com
Sat Mar 19 04:32:14 UTC 2016


On Fri, Mar 18, 2016 at 04:43:23PM -0700, Piotr Sikora wrote:
> # HG changeset patch
> # User Piotr Sikora <piotrsikora at google.com>
> # Date 1458344288 25200
> #      Fri Mar 18 16:38:08 2016 -0700
> # Node ID 446abf3e009c5bdeee865161ad5813c07163c0e8
> # Parent  c9d680b00744ea515369113585e5d5bfc4ce51de
> Fix build with -Wmissing-prototypes.
> 
> Broken in 5eb4d7541107 (1.9.6), fix somehow missed in 3600bbfb43e3.
> 
> Signed-off-by: Piotr Sikora <piotrsikora at google.com>
> 
> diff -r c9d680b00744 -r 446abf3e009c src/core/nginx.c
> --- a/src/core/nginx.c
> +++ b/src/core/nginx.c
> @@ -10,7 +10,7 @@
>  #include <nginx.h>
>  
>  
> -static void ngx_show_version_info();
> +static void ngx_show_version_info(void);
>  static ngx_int_t ngx_add_inherited_sockets(ngx_cycle_t *cycle);
>  static ngx_int_t ngx_get_options(int argc, char *const *argv);
>  static ngx_int_t ngx_process_options(ngx_cycle_t *cycle);

Thanks, committed with minor change:

http://hg.nginx.org/nginx/rev/0ff7eff48c7e

For some reason, clang(1) only warns about it if you remove "static".



More information about the nginx-devel mailing list