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

More FlexeLinting

parent af0c665e
......@@ -137,7 +137,6 @@
// Review all below this line ///////////////////////////////////////////////
-e713 // 42 Loss of precision (___) (___ to ___)
-e574 // 48 Signed-unsigned mix with relational
-e840 // Use of nul character in a string literal (see: vcc_if.c)
-e663 // Suspicious array to pointer conversion
-e778 // Constant expression evaluates to 0 in operation '___'
......
......@@ -7,7 +7,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
-e788 // enum constant '___' not used within defaulted switch
-e641 // Converting enum '___' to '___'
......@@ -12,7 +12,6 @@
-e767 // Macro redef (system queue.h vs ours )
-e574 // Signed-unsigned mix with relational
-e712 // Loss of precision (assignment) (long long to
-e747 // Significant prototype coercion (arg. no. 2) long
-e713 // Loss of precision (assignment) (unsigned long long to long long)
......
......@@ -12,7 +12,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
///////////////////////////////////////////////////////////////////////
// Varnishstat specific
......
......@@ -6,7 +6,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
///////////////////////////////////////////////////////////////////////
// Varnishstat specific
......
......@@ -27,6 +27,7 @@
///////////////////////////////////////////////////////////////////////
// General stylistic issues
-e574 // Signed-unsigned mix with relational
-e641 // Converting enum '...' to int
-e716 // while(1) ...
-e726 // Extraneous comma ignored
......
......@@ -75,9 +75,10 @@
#define REPLACE(ptr, val) \
do { \
const char *_vreplace = (val); \
free(ptr); \
if ((val) != NULL) { \
ptr = strdup(val); \
if (_vreplace != NULL) { \
ptr = strdup(_vreplace); \
AN((ptr)); \
} else { \
ptr = NULL; \
......
......@@ -60,7 +60,6 @@
-e732 // Loss of sign (arg. no. 2) (int to unsigned
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
-e712 // Loss of precision (assignment) (long long to
-e747 // Significant prototype coercion (arg. no. 2) long
......
......@@ -172,7 +172,7 @@ vsl_match_IX(struct VSL_data *vsl, const vslf_list *list,
const struct vslf *vslf;
(void)vsl;
tag = VSL_TAG(c->rec.ptr);
tag = (enum VSL_tag_e)VSL_TAG(c->rec.ptr);
cdata = VSL_CDATA(c->rec.ptr);
len = VSL_LEN(c->rec.ptr);
......@@ -194,7 +194,7 @@ VSL_Match(struct VSL_data *vsl, const struct VSL_cursor *c)
CHECK_OBJ_NOTNULL(vsl, VSL_MAGIC);
if (c == NULL || c->rec.ptr == NULL)
return (0);
tag = VSL_TAG(c->rec.ptr);
tag = (enum VSL_tag_e)VSL_TAG(c->rec.ptr);
if (tag <= SLT__Bogus || tag >= SLT__Reserved)
return (0);
if (vsl->c_opt && !VSL_CLIENT(c->rec.ptr))
......@@ -245,7 +245,7 @@ VSL_Print(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
return (0);
if (fo == NULL)
fo = stdout;
tag = VSL_TAG(c->rec.ptr);
tag = (enum VSL_tag_e)VSL_TAG(c->rec.ptr);
vxid = VSL_ID(c->rec.ptr);
len = VSL_LEN(c->rec.ptr);
type = VSL_CLIENT(c->rec.ptr) ? 'c' : VSL_BACKEND(c->rec.ptr) ?
......@@ -283,7 +283,7 @@ VSL_PrintTerse(const struct VSL_data *vsl, const struct VSL_cursor *c, void *fo)
return (0);
if (fo == NULL)
fo = stdout;
tag = VSL_TAG(c->rec.ptr);
tag = (enum VSL_tag_e)VSL_TAG(c->rec.ptr);
len = VSL_LEN(c->rec.ptr);
data = VSL_CDATA(c->rec.ptr);
......
......@@ -859,7 +859,7 @@ vtx_scan(struct VSLQ *vslq, struct vtx *vtx)
continue;
}
tag = VSL_TAG(ptr);
tag = (enum VSL_tag_e)VSL_TAG(ptr);
assert(tag != SLT__Batch);
switch (tag) {
......@@ -1247,14 +1247,14 @@ vslq_next(struct VSLQ *vslq)
if (i != 1)
return (i);
tag = VSL_TAG(c->rec.ptr);
tag = (enum VSL_tag_e)VSL_TAG(c->rec.ptr);
if (tag == SLT__Batch) {
vxid = VSL_BATCHID(c->rec.ptr);
len = VSL_END(c->rec.ptr, VSL_BATCHLEN(c->rec.ptr)) -
c->rec.ptr;
if (len == 0)
return (i);
tag = VSL_TAG(VSL_NEXT(c->rec.ptr));
tag = (enum VSL_tag_e)VSL_TAG(VSL_NEXT(c->rec.ptr));
} else {
vxid = VSL_ID(c->rec.ptr);
len = VSL_NEXT(c->rec.ptr) - c->rec.ptr;
......
......@@ -37,7 +37,6 @@
-e506 // Constant value boolean
-e774 // Boolean within 'if' always evaluates to False
-e713 // Loss of precision (assignment) (unsigned long long to long long)
-e574 // Signed-unsigned mix with relational
-e539 // Did not expect positive indentation
-e734 // Loss of precision (assignment) (31 bits to 8 bits)
-e747 // Significant prototype coercion (arg. no. 2) long
......
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