Changeset 4475

Show
Ignore:
Timestamp:
01/20/10 13:26:29 (6 months ago)
Author:
phk
Message:

Various flexelint silencings.

Location:
trunk/varnish-cache
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • trunk/varnish-cache/bin/varnishd/cache.h

    r4456 r4475  
    515515void http_ClrHeader(struct http *to); 
    516516unsigned http_Write(struct worker *w, const struct http *hp, int resp); 
    517 void http_CopyResp(struct http *to, const struct http *fm); 
    518 void http_SetResp(struct http *to, const char *proto, const char *status, 
     517void http_CopyResp(const struct http *to, const struct http *fm); 
     518void http_SetResp(const struct http *to, const char *proto, const char *status, 
    519519    const char *response); 
    520520void http_FilterFields(struct worker *w, int fd, struct http *to, 
    521521    const struct http *fm, unsigned how); 
    522522void http_FilterHeader(const struct sess *sp, unsigned how); 
    523 void http_PutProtocol(struct worker *w, int fd, struct http *to, 
     523void http_PutProtocol(struct worker *w, int fd, const struct http *to, 
    524524    const char *protocol); 
    525525void http_PutStatus(struct worker *w, int fd, struct http *to, int status); 
    526 void http_PutResponse(struct worker *w, int fd, struct http *to, 
     526void http_PutResponse(struct worker *w, int fd, const struct http *to, 
    527527    const char *response); 
    528528void http_PrintfHeader(struct worker *w, int fd, struct http *to, 
    529529    const char *fmt, ...); 
    530530void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr); 
    531 void http_SetH(struct http *to, unsigned n, const char *fm); 
    532 void http_ForceGet(struct http *to); 
     531void http_SetH(const struct http *to, unsigned n, const char *fm); 
     532void http_ForceGet(const struct http *to); 
    533533void http_Setup(struct http *ht, struct ws *ws); 
    534534int http_GetHdr(const struct http *hp, const char *hdr, char **ptr); 
     
    541541int http_DissectResponse(struct worker *w, const struct http_conn *htc, 
    542542    struct http *sp); 
    543 const char *http_DoConnection(struct http *hp); 
    544 void http_CopyHome(struct worker *w, int fd, struct http *hp); 
     543const char *http_DoConnection(const struct http *hp); 
     544void http_CopyHome(struct worker *w, int fd, const struct http *hp); 
    545545void http_Unset(struct http *hp, const char *hdr); 
    546546 
  • trunk/varnish-cache/bin/varnishd/cache_dir_random.c

    r4460 r4475  
    8787        struct vdi_random *vs; 
    8888        double r, s1; 
    89         unsigned u; 
     89        unsigned u = 0; 
    9090        struct vbe_conn *vbe; 
    9191        struct director *d2; 
  • trunk/varnish-cache/bin/varnishd/cache_http.c

    r4467 r4475  
    285285 
    286286const char * 
    287 http_DoConnection(struct http *hp) 
     287http_DoConnection(const struct http *hp) 
    288288{ 
    289289        char *p, *q; 
     
    589589 
    590590void 
    591 http_SetH(struct http *to, unsigned n, const char *fm) 
     591http_SetH(const struct http *to, unsigned n, const char *fm) 
    592592{ 
    593593 
     
    600600 
    601601static void 
    602 http_copyh(struct http *to, const struct http *fm, unsigned n) 
     602http_copyh(const struct http *to, const struct http *fm, unsigned n) 
    603603{ 
    604604 
     
    610610 
    611611void 
    612 http_ForceGet(struct http *to) 
     612http_ForceGet(const struct http *to) 
    613613{ 
    614614        if (strcmp(http_GetReq(to), "GET")) 
     
    617617 
    618618void 
    619 http_CopyResp(struct http *to, const struct http *fm) 
     619http_CopyResp(const struct http *to, const struct http *fm) 
    620620{ 
    621621 
     
    631631 
    632632void 
    633 http_SetResp(struct http *to, const char *proto, const char *status, 
     633http_SetResp(const struct http *to, const char *proto, const char *status, 
    634634    const char *response) 
    635635{ 
     
    743743 
    744744void 
    745 http_CopyHome(struct worker *w, int fd, struct http *hp) 
     745http_CopyHome(struct worker *w, int fd, const struct http *hp) 
    746746{ 
    747747        unsigned u, l; 
     
    802802 
    803803static void 
    804 http_PutField(struct worker *w, int fd, struct http *to, int field, 
     804http_PutField(struct worker *w, int fd, const struct http *to, int field, 
    805805    const char *string) 
    806806{ 
     
    825825 
    826826void 
    827 http_PutProtocol(struct worker *w, int fd, struct http *to, 
     827http_PutProtocol(struct worker *w, int fd, const struct http *to, 
    828828    const char *protocol) 
    829829{ 
     
    844844 
    845845void 
    846 http_PutResponse(struct worker *w, int fd, struct http *to, 
     846http_PutResponse(struct worker *w, int fd, const struct http *to, 
    847847    const char *response) 
    848848{ 
  • trunk/varnish-cache/bin/varnishd/flint.lnt

    r4440 r4475  
    4040-esym(755, VTAILQ_*) 
    4141 
     42// XXX: I think this is a flexelint bug: 
     43-esym(522, vbit_clr) 
     44 
    4245// Stuff used outside varnishd 
    4346-esym(759, BackSlash) 
  • trunk/varnish-cache/bin/varnishd/mgt_vcc.c

    r4464 r4475  
    4545#include <unistd.h> 
    4646 
    47 #include "compat/asprintf.h" 
    4847#include "vsb.h" 
    4948 
     
    357356                } 
    358357 
    359                 asprintf(&vcl, 
     358                bprintf(buf, 
    360359                    "backend default {\n" 
    361360                    "    .host = \"%s\";\n" 
     
    364363                free(addr); 
    365364                free(port); 
     365                vcl = strdup(buf); 
    366366                AN(vcl); 
    367367                bprintf(buf, "boot (-b %s)", b_arg); 
  • trunk/varnish-cache/bin/varnishd/stevedore.h

    r4456 r4475  
    4040typedef struct storage *storage_alloc_f(struct stevedore *, size_t size, 
    4141    struct objcore *); 
    42 typedef struct object *storage_alloc_obj_f(struct stevedore *, size_t size, 
    43     double ttl); 
    4442typedef void storage_trim_f(struct storage *, size_t size); 
    4543typedef void storage_free_f(struct storage *); 
     
    5553        storage_open_f          *open;  /* called by cache process */ 
    5654        storage_alloc_f         *alloc; 
    57         storage_alloc_obj_f     *allocobj; 
    5855        storage_trim_f          *trim; 
    5956        storage_free_f          *free; 
  • trunk/varnish-cache/bin/varnishd/stevedore_utils.c

    r4436 r4475  
    5656#endif 
    5757 
    58 #include "compat/asprintf.h" 
    5958#include "mgt.h" 
    6059#include "stevedore.h" 
     
    8786        char *q; 
    8887        int retval = 1; 
     88        char buf[FILENAME_MAX]; 
    8989 
    9090        AN(fn); 
     
    108108 
    109109        if (S_ISDIR(st.st_mode)) { 
    110                 xxxassert(asprintf(&q, "%s/varnish.XXXXXX", fn) > 0); 
    111                 XXXAN(q); 
    112                 fd = mkstemp(q); 
     110                bprintf(buf, "%s/varnish.XXXXXX", fn); 
     111                fd = mkstemp(buf); 
    113112                if (fd < 0) 
    114113                        ARGV_ERR("(%s) \"%s\" mkstemp(%s) failed (%s)\n", 
    115114                            ctx, fn, q, strerror(errno)); 
    116                 *fnp = q; 
     115                *fnp = strdup(buf); 
     116                AN(*fnp); 
    117117                retval = 2; 
    118118        } else if (S_ISREG(st.st_mode)) { 
  • trunk/varnish-cache/bin/varnishd/varnishd.c

    r4462 r4475  
    5050#include <unistd.h> 
    5151 
    52 #include "compat/asprintf.h" 
    5352#include "compat/daemon.h" 
    5453 
     
    439438        uintptr_t a; 
    440439        struct symbols *s; 
    441         int i; 
    442  
    443         p = NULL; 
    444         i = asprintf(&p, "nm -an %s 2>/dev/null", a0); 
    445         if (i < 0 || p == NULL) 
    446                 return; 
    447         fi = popen(p, "r"); 
    448         free(p); 
     440 
     441        bprintf(buf, "nm -an %s 2>/dev/null", a0); 
     442        fi = popen(buf, "r"); 
    449443        if (fi == NULL) 
    450444                return; 
  • trunk/varnish-cache/include/vbm.h

    r4446 r4475  
    8686 
    8787static inline void 
    88 vbit_clr(struct vbitmap *vb, unsigned bit) 
     88vbit_clr(const struct vbitmap *vb, unsigned bit) 
    8989{ 
    9090 
     
    9494 
    9595static inline int 
    96 vbit_test(struct vbitmap *vb, unsigned bit) 
     96vbit_test(const struct vbitmap *vb, unsigned bit) 
    9797{ 
    9898 
  • trunk/varnish-cache/lib/libvcl/vcc_compile.c

    r4401 r4475  
    9797/*--------------------------------------------------------------------*/ 
    9898 
    99 void 
    100 TlFree(struct tokenlist *tl, void *p) 
     99static void 
     100TlDoFree(struct tokenlist *tl, void *p) 
    101101{ 
    102102        struct membit *mb; 
     
    116116        p = calloc(len, 1); 
    117117        assert(p != NULL); 
    118         TlFree(tl, p); 
     118        TlDoFree(tl, p); 
    119119        return (p); 
    120120} 
  • trunk/varnish-cache/lib/libvcl/vcc_compile.h

    r4405 r4475  
    177177void EncToken(struct vsb *sb, const struct token *t); 
    178178int IsMethod(const struct token *t); 
    179 void TlFree(struct tokenlist *tl, void *p); 
    180179void *TlAlloc(struct tokenlist *tl, unsigned len); 
    181180