Commit a54af587 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

A quick FlexeLint check to see that there are no major complaints

parent 703e7e67
......@@ -103,3 +103,10 @@
-elib(123) // macro def. with arg at, (just warn)
-emacro(702, WEXITSTATUS) // signed shift right
-e786 // String concatenation within initializer
-e726 // Extraneous comma ignored
-e825 // control flows into case/default without -fallthrough comment
-e835 // A zero has been given as ___ argument to operator '___' (<<)
......@@ -77,7 +77,6 @@
-e459 // unlocked access from func-ptr
-e454 // mutex not released (...ReleaseLocked)
-e457 // unprotected access
-e835 // A zero has been given as ___ argument to operator '___' (<<)
-e777 // float equality comparison
-e679 // Suspicious Truncation in arithmetic expression combining with pointer
......@@ -130,11 +129,9 @@
-e455 // thread lock
-e458 // unprotected read
-e763 // Redundant declaration for symbol '...' previously declared
-e726 // Extraneous comma ignored
-e728 // Symbol ... not explicitly initialized
-e716 // while(1) ...
-e785 // Too few initializers for aggregate
-e786 // String concatenation within initializer
-esym(765, vcc_ProcAction) // could be made static
-esym(759, vcc_ProcAction) // could be moved to module
......
......@@ -18,4 +18,4 @@
-e788 // enum constant '___' not used within defaulted switch
-e641 // Converting enum '___' to '___'
-esym(785,VSL_tags); // Sparse array
-esym(785,VSL_tags) // Sparse array
......@@ -128,7 +128,7 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
* starting on the new one.
*/
if (last[fd] != SLT_SessClose)
VSB_printf(ob[fd], "%5d %-12s %c %s\n",
VSB_printf(ob[fd], "%5u %-12s %c %s\n",
fd, "Interrupted", type, VSL_tags[tag]);
h_order_finish(fd, vd);
}
......@@ -141,8 +141,8 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
VSB_cat(ob[fd], "\n");
else
flg[fd] |= F_INVCL;
VSB_printf(ob[fd], "%5d %-12s %c %.*s",
fd, VSL_tags[tag], type, len, ptr);
VSB_printf(ob[fd], "%5u %-12s %c %.*s",
fd, VSL_tags[tag], type, (int)len, ptr);
return (0);
case SLT_VCL_trace:
case SLT_VCL_return:
......@@ -159,8 +159,8 @@ h_order(void *priv, enum VSL_tag_e tag, unsigned fd, unsigned len,
VSB_cat(ob[fd], "\n");
flg[fd] &= ~F_INVCL;
}
VSB_printf(ob[fd], "%5d %-12s %c %.*s\n",
fd, VSL_tags[tag], type, len, ptr);
VSB_printf(ob[fd], "%5u %-12s %c %.*s\n",
fd, VSL_tags[tag], type, (int)len, ptr);
switch (tag) {
case SLT_ReqEnd:
case SLT_BackendClose:
......
......@@ -6,10 +6,6 @@
#include "config.h"
#include <sys/types.h>
#include <stdio.h> // for test-prog
#include "base64.h"
static const char b64[] =
......@@ -63,6 +59,8 @@ VB64_decode(char *d, unsigned dlen, const char *s)
#ifdef TEST_DRIVER
#include <stdio.h> // for test-prog
const char *test1 =
"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz"
"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg"
......
......@@ -77,7 +77,6 @@
#include "vcs.h"
#include "vpf.h"
#include "vqueue.h"
#include "vre.h"
#include "vsb.h"
#include "compat/daemon.h"
......@@ -112,7 +111,7 @@ static struct logline {
VTAILQ_HEAD(, hdr) vcl_log; /* VLC_Log entries */
} **ll;
struct VSM_data *vd;
static struct VSM_data *vd;
static size_t nll;
......@@ -210,7 +209,6 @@ req_header(struct logline *l, const char *name)
VTAILQ_FOREACH(h, &l->req_headers, list) {
if (strcasecmp(h->key, name) == 0) {
return (h->value);
break;
}
}
return (NULL);
......@@ -223,7 +221,6 @@ resp_header(struct logline *l, const char *name)
VTAILQ_FOREACH(h, &l->resp_headers, list) {
if (strcasecmp(h->key, name) == 0) {
return (h->value);
break;
}
}
return (NULL);
......@@ -236,7 +233,6 @@ vcl_log(struct logline *l, const char *name)
VTAILQ_FOREACH(h, &l->vcl_log, list) {
if (strcasecmp(h->key, name) == 0) {
return (h->value);
break;
}
}
return (NULL);
......@@ -796,6 +792,7 @@ h_ncsa(void *priv, enum VSL_tag_e tag, unsigned fd,
p = tmp;
break;
}
/* FALLTHROUGH */
default:
fprintf(stderr,
"Unknown format starting at: %s\n", --p);
......@@ -923,7 +920,8 @@ main(int argc, char *argv[])
/* XXX: Silently ignored: it's required anyway */
break;
case 'm':
m_flag = 1; /* Fall through */
m_flag = 1;
/* FALLTHOUGH */
default:
if (VSL_Arg(vd, c, optarg) > 0)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment