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)
sp->addr ? sp->addr : "?.?.?.?",
sp->port ? sp->port : "?");
switch (sp->step) {
/*lint -save -e525 */
#define STEP(l, u) case STP_##u: stp = "STP_" #u; break;
#include "steps.h"
#undef STEP
/*lint -restore */
default: stp = NULL;
}
hand = VCC_Return_Name(sp->handling);
......
......@@ -96,8 +96,6 @@
-emacro(527, NEEDLESS_RETURN) // unreachable code
-efunc(525, VCC_Return_Name) // Negative indent
-sem(WS_Init, custodial(2))
-sem(http_Setup, custodial(2))
......@@ -129,18 +127,10 @@
// cache.h
-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_return_address) // Not defined
// cache_vcl.c
-efunc(525, vcl_handlingname) // Negative indentation from line
-esym(528, vcl_handlingname) // Not referenced
-e641 // Converting enum 'cli_status_e' to int
......
......@@ -29,6 +29,7 @@
* $Id$
*/
/*lint -save -e525 -e539 */
STEP(wait, WAIT)
STEP(first, FIRST)
STEP(recv, RECV)
......@@ -42,3 +43,4 @@ STEP(fetch, FETCH)
STEP(deliver, DELIVER)
STEP(error, ERROR)
STEP(done, DONE)
/*lint -restore */
......@@ -42,6 +42,8 @@
*
*/
/*lint -save -e525 -e539 */
#ifndef HTTPH_R_PASS
#define HTTPH_R_PASS (1 << 0) /* Request (c->b) 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 */
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("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")
file_header(fo)
fo.write("\n/*lint -save -e525 -e539 */\n")
fo.write("\n#ifdef VCL_RET_MAC\n")
l = list(rets.keys())
l.sort()
......@@ -603,6 +605,7 @@ for i in returns:
p = "| "
fo.write("))\n")
fo.write("#endif\n")
fo.write("\n/*lint -restore */\n")
fo.close()
#######################################################################
......
......@@ -270,7 +270,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
}
u = p->ret_bitmap & ~bitmap;
if (u) {
/*lint -save -e525 -e539 */
#define VCL_RET_MAC(l, U, B) \
if (u & (1 << (VCL_RET_##U))) { \
vsb_printf(tl->sb, "Invalid return \"" #l "\"\n");\
......@@ -278,7 +278,7 @@ vcc_CheckActionRecurse(struct vcc *tl, struct proc *p, unsigned bitmap)
}
#include "vcl_returns.h"
#undef VCL_RET_MAC
/*lint -restore */
vsb_printf(tl->sb, "\n...in subroutine \"%.*s\"\n",
PF(p->name));
vcc_ErrWhere(tl, p->name);
......@@ -317,11 +317,9 @@ vcc_CheckAction(struct vcc *tl)
#define VCL_RET_MAC(l, U, B) \
if (m->ret_bitmap & ((1 << VCL_RET_##U))) \
vsb_printf(tl->sb, " \"%s\"", #l);
/*lint -save -e525 -e539 */
#include "vcl_returns.h"
/*lint +e525 */
#undef VCL_RET_MAC
/*lint -restore */
vsb_printf(tl->sb, "\n");
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