[Varnish] #921: 3.0.0b1r0fb00eb/linux-64 build; incompatible pointer type & wrong arg type warnings @ exec

Varnish varnish-bugs at varnish-cache.org
Tue May 24 02:47:07 CEST 2011


#921: 3.0.0b1r0fb00eb/linux-64 build; incompatible pointer type & wrong arg type
warnings @ exec
-----------------------------+----------------------------------------------
 Reporter:  agd              |        Type:  defect
   Status:  new              |    Priority:  normal
Milestone:  Varnish 3.0 dev  |   Component:  build 
  Version:  trunk            |    Severity:  normal
 Keywords:                   |  
-----------------------------+----------------------------------------------
 i've built


 {{{
 varnishd -V
         varnishd (varnish-3.0.0-beta1 revision 0fb00eb)
         Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS

 }}}

 on linux 64-bit.

 @ service start,


 {{{
 service varnish start
         Starting varnish SMF.s0: filename:
 /var/cache/varnish/test1/test1.file.backend size 400 MB.
         Message from C-compiler:
         ./vcl.1P9zoqAU.c: In function 'VGC_function_test1site_vcl_recv':
         ./vcl.1P9zoqAU.c:950:13: warning: passing argument 3 of
 'VRT_regsub' from incompatible pointer type
         ./vcl.1P9zoqAU.c:223:13: note: expected 'const char *' but
 argument is of type 'struct sockaddr_storage *'
         ./vcl.1P9zoqAU.c:961:13: warning: passing argument 3 of
 'VRT_regsub' from incompatible pointer type
         ./vcl.1P9zoqAU.c:223:13: note: expected 'const char *' but
 argument is of type 'struct sockaddr_storage *'


 }}}
 but checking,

 {{{
 ps ax | grep -i varnish
         29982 ?        Ss     0:00 /usr/local/sbin/varnishd -f
 /usr/local/etc/varnish/vcl.test1.conf -a 127.0.0.1:7100,[::1]:7100 -T
 127.0.0.1:7101 -s file,/var/cache/varnish/test1/test1.file.backend,400M -p
 queue_max 2000 -p thread_pools 4 -p thread_pool_min 200 -p thread_pool_max
 4000 -p thread_pool_add_delay 2 -h critbit -p listen_depth 2048 -p
 sess_timeout 600 -p session_linger 50 -p sess_workspace 16384 -P
 /var/run/varnish.pid -n test1
         29983 ?        Sl     0:00 /usr/local/sbin/varnishd -f
 /usr/local/etc/varnish/vcl.test1.conf -a 127.0.0.1:7100,[::1]:7100 -T
 127.0.0.1:7101 -s file,/var/cache/varnish/test1/test1.file.backend,400M -p
 queue_max 2000 -p thread_pools 4 -p thread_pool_min 200 -p thread_pool_max
 4000 -p thread_pool_add_delay 2 -h critbit -p listen_depth 2048 -p
 sess_timeout 600 -p session_linger 50 -p sess_workspace 16384 -P
 /var/run/varnish.pid -n test1

 }}}

 and my site's accessible, caching appearing OK

 checking in the vcl for instances of regsub, i've


 {{{
 sub test1site_vcl_recv {
     ...
     if (req.http.X-Forwarded-For) {
         set req.http.X-Forwarded-For =
         req.http.X-Forwarded-For + ", " +
         regsub(client.ip, ":.*", "");
     } else {
         set req.http.X-Forwarded-For =
         regsub(client.ip, ":.*", "");
     }
     ...
     set req.http.Cookie = regsub(req.http.Cookie, "^;\s*", "");
     ...
 }
 }}}

 checking compiled output (-C),

 ~ lineno 220,
 {{{
 ...
 /* Regexp related */
 void VRT_re_init(void **, const char *);
 void VRT_re_fini(void *);
 int VRT_re_match(const char *, void *re);
 const char *VRT_regsub(const struct sess *sp, int all, const char *,
     void *, const char *);

 void VRT_panic(const struct sess *sp, const char *, ...);
 ...
 }}}
 & ! lineno 942
 {{{
 ...
       if (
         (VRT_GetHdr(sp, HDR_REQ, "\020X-Forwarded-For:") != 0)
       )
         {
           VRT_count(sp, 21);
           VRT_SetHdr(sp, HDR_REQ, "\020X-Forwarded-For:",
             VRT_GetHdr(sp, HDR_REQ, "\020X-Forwarded-For:"),
             ", ",
             VRT_regsub(sp, 0,
             VRT_r_client_ip(sp),
             VGC_re_5
             , ""),
             vrt_magic_string_end
           );
         }
       else
         {
           VRT_count(sp, 22);
           VRT_SetHdr(sp, HDR_REQ, "\020X-Forwarded-For:",
             VRT_regsub(sp, 0,
             VRT_r_client_ip(sp),
             VGC_re_6
             , ""),
             vrt_magic_string_end
           );
         }
 ...
 }}}
 are those 'warnings' (not errors) anything to worry about?  is there an
 issue with any of the used syntax?

-- 
Ticket URL: <http://varnish-cache.org/trac/ticket/921>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list