[nginx] svn commit: r4649 - trunk/src/http/modules

Maxim Dounin mdounin at mdounin.ru
Tue May 29 08:38:19 UTC 2012


Hello!

On Mon, May 28, 2012 at 09:44:39PM +0700, Denis F. Latypoff wrote:

> 
> 
> 28.05.2012, 21:26, "Maxim Dounin" <mdounin at mdounin.ru>:
> > Hello!
> >
> > On Mon, May 28, 2012 at 02:20:04PM +0000, ru at nginx.com wrote:
> >
> >>  Author: ru
> >>  Date: 2012-05-28 14:20:04 +0000 (Mon, 28 May 2012)
> >>  New Revision: 4649
> >>  URL: http://trac.nginx.org/nginx/changeset/4649/nginx
> >>
> >>  Log:
> >>  Fixed broken build.
> >>
> >>  Modified:
> >>     trunk/src/http/modules/ngx_http_geoip_module.c
> >>
> >>  Modified: trunk/src/http/modules/ngx_http_geoip_module.c
> >>  ===================================================================
> >>  --- trunk/src/http/modules/ngx_http_geoip_module.c 2012-05-28 13:17:48 UTC (rev 4648)
> >>  +++ trunk/src/http/modules/ngx_http_geoip_module.c 2012-05-28 14:20:04 UTC (rev 4649)
> >>  @@ -310,7 +310,7 @@
> >>       len = ngx_strlen(val);
> >>       v->data = ngx_pnalloc(r->pool, len);
> >>       if (v->data == NULL) {
> >>  -        ngx_free(val);
> >>  +        ngx_free((void *) val);
> >>           return NGX_ERROR;
> >>       }
> >>
> >>  @@ -321,7 +321,7 @@
> >>       v->no_cacheable = 0;
> >>       v->not_found = 0;
> >>
> >>  -    ngx_free(val);
> >>  +    ngx_free((void *) val);
> >
> > Correct fix would be to remove "const" from the val.  Please try
> > again.
> 
> Yes, that was my first version of patch, but there is another
> warning:
> 
> src/http/modules/ngx_http_geoip_module.c:304: warning:
> assignment discards qualifiers from pointer target type
> 
>     val = handler(gcf->org, ngx_http_geoip_addr(r, gcf));

Yes, the handler type needs to be fixed, too.

Maxim Dounin



More information about the nginx-devel mailing list