Commit 4e2629d9 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move Flexelint supressing comments into the parameter include files

that cause them, rather than try to patch all the indentation
warnings they cause wherever they are used.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5139 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 54fc64d6
...@@ -219,11 +219,9 @@ pan_sess(const struct sess *sp) ...@@ -219,11 +219,9 @@ pan_sess(const struct sess *sp)
sp->addr ? sp->addr : "?.?.?.?", sp->addr ? sp->addr : "?.?.?.?",
sp->port ? sp->port : "?"); sp->port ? sp->port : "?");
switch (sp->step) { switch (sp->step) {
/*lint -save -e525 */
#define STEP(l, u) case STP_##u: stp = "STP_" #u; break; #define STEP(l, u) case STP_##u: stp = "STP_" #u; break;
#include "steps.h" #include "steps.h"
#undef STEP #undef STEP
/*lint -restore */
default: stp = NULL; default: stp = NULL;
} }
hand = VCC_Return_Name(sp->handling); hand = VCC_Return_Name(sp->handling);
......
...@@ -96,8 +96,6 @@ ...@@ -96,8 +96,6 @@
-emacro(527, NEEDLESS_RETURN) // unreachable code -emacro(527, NEEDLESS_RETURN) // unreachable code
-efunc(525, VCC_Return_Name) // Negative indent
-sem(WS_Init, custodial(2)) -sem(WS_Init, custodial(2))
-sem(http_Setup, custodial(2)) -sem(http_Setup, custodial(2))
...@@ -129,18 +127,10 @@ ...@@ -129,18 +127,10 @@
// cache.h // cache.h
-emacro(506, INCOMPL) // Constant value Boolean -emacro(506, INCOMPL) // Constant value Boolean
// cache_center.c
-efunc(525, CNT_Session) // Negative indentation from line
-efunc(525, http_FilterFields) // Negative indentation from line
-efunc(525, http_EstimateWS) // Negative indentation from line
-efunc(539, http_FilterFields) // Positive indentation from line
-efunc(539, http_EstimateWS) // Positive indentation from line
-esym(525, __builtin_frame_address) // Not defined -esym(525, __builtin_frame_address) // Not defined
-esym(525, __builtin_return_address) // Not defined -esym(525, __builtin_return_address) // Not defined
// cache_vcl.c // cache_vcl.c
-efunc(525, vcl_handlingname) // Negative indentation from line
-esym(528, vcl_handlingname) // Not referenced -esym(528, vcl_handlingname) // Not referenced
-e641 // Converting enum 'cli_status_e' to int -e641 // Converting enum 'cli_status_e' to int
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
* $Id$ * $Id$
*/ */
/*lint -save -e525 -e539 */
STEP(wait, WAIT) STEP(wait, WAIT)
STEP(first, FIRST) STEP(first, FIRST)
STEP(recv, RECV) STEP(recv, RECV)
...@@ -42,3 +43,4 @@ STEP(fetch, FETCH) ...@@ -42,3 +43,4 @@ STEP(fetch, FETCH)
STEP(deliver, DELIVER) STEP(deliver, DELIVER)
STEP(error, ERROR) STEP(error, ERROR)
STEP(done, DONE) STEP(done, DONE)
/*lint -restore */
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
* *
*/ */
/*lint -save -e525 -e539 */
#ifndef HTTPH_R_PASS #ifndef HTTPH_R_PASS
#define HTTPH_R_PASS (1 << 0) /* Request (c->b) in pass mode */ #define HTTPH_R_PASS (1 << 0) /* Request (c->b) in pass mode */
#define HTTPH_A_PASS (1 << 1) /* Response (b->c)in pass mode */ #define HTTPH_A_PASS (1 << 1) /* Response (b->c)in pass mode */
...@@ -99,3 +101,5 @@ HTTPH("Vary", H_Vary, 2, 0, 0, 0, 0) /* RFC2616 14.44 */ ...@@ -99,3 +101,5 @@ HTTPH("Vary", H_Vary, 2, 0, 0, 0, 0) /* RFC2616 14.44 */
HTTPH("Via", H_Via, 2, 0, 0, 0, 0) /* RFC2616 14.45 */ HTTPH("Via", H_Via, 2, 0, 0, 0, 0) /* RFC2616 14.45 */
HTTPH("Warning", H_Warning, 2, 0, 0, 0, 0) /* RFC2616 14.46 */ HTTPH("Warning", H_Warning, 2, 0, 0, 0, 0) /* RFC2616 14.46 */
HTTPH("WWW-Authenticate", H_WWW_Authenticate, 2, 0, 0, 0, 0) /* RFC2616 14.47 */ HTTPH("WWW-Authenticate", H_WWW_Authenticate, 2, 0, 0, 0, 0) /* RFC2616 14.47 */
/*lint -restore */
...@@ -581,6 +581,8 @@ fo = open(buildroot + "/include/vcl_returns.h", "w") ...@@ -581,6 +581,8 @@ fo = open(buildroot + "/include/vcl_returns.h", "w")
file_header(fo) file_header(fo)
fo.write("\n/*lint -save -e525 -e539 */\n")
fo.write("\n#ifdef VCL_RET_MAC\n") fo.write("\n#ifdef VCL_RET_MAC\n")
l = list(rets.keys()) l = list(rets.keys())
l.sort() l.sort()
...@@ -603,6 +605,7 @@ for i in returns: ...@@ -603,6 +605,7 @@ for i in returns:
p = "| " p = "| "
fo.write("))\n") fo.write("))\n")
fo.write("#endif\n") fo.write("#endif\n")
fo.write("\n/*lint -restore */\n")
fo.close() fo.close()
####################################################################### #######################################################################
......
...@@ -270,7 +270,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap) ...@@ -270,7 +270,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
} }
u = p->ret_bitmap & ~bitmap; u = p->ret_bitmap & ~bitmap;
if (u) { if (u) {
/*lint -save -e525 -e539 */
#define VCL_RET_MAC(l, U, B) \ #define VCL_RET_MAC(l, U, B) \
if (u & (1 << (VCL_RET_##U))) { \ if (u & (1 << (VCL_RET_##U))) { \
vsb_printf(tl->sb, "Invalid return \"" #l "\"\n");\ vsb_printf(tl->sb, "Invalid return \"" #l "\"\n");\
...@@ -278,7 +278,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap) ...@@ -278,7 +278,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
} }
#include "vcl_returns.h" #include "vcl_returns.h"
#undef VCL_RET_MAC #undef VCL_RET_MAC
/*lint -restore */
vsb_printf(tl->sb, "\n...in subroutine \"%.*s\"\n", vsb_printf(tl->sb, "\n...in subroutine \"%.*s\"\n",
PF(p->name)); PF(p->name));
vcc_ErrWhere(tl, p->name); vcc_ErrWhere(tl, p->name);
...@@ -317,11 +317,9 @@ vcc_CheckAction(struct vcc *tl) ...@@ -317,11 +317,9 @@ vcc_CheckAction(struct vcc *tl)
#define VCL_RET_MAC(l, U, B) \ #define VCL_RET_MAC(l, U, B) \
if (m->ret_bitmap & ((1 << VCL_RET_##U))) \ if (m->ret_bitmap & ((1 << VCL_RET_##U))) \
vsb_printf(tl->sb, " \"%s\"", #l); vsb_printf(tl->sb, " \"%s\"", #l);
/*lint -save -e525 -e539 */
#include "vcl_returns.h" #include "vcl_returns.h"
/*lint +e525 */
#undef VCL_RET_MAC #undef VCL_RET_MAC
/*lint -restore */
vsb_printf(tl->sb, "\n"); vsb_printf(tl->sb, "\n");
return (1); return (1);
} }
......
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