r5139 - in trunk/varnish-cache: bin/varnishd include lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Fri Aug 27 09:20:57 CEST 2010


Author: phk
Date: 2010-08-27 09:20:57 +0200 (Fri, 27 Aug 2010)
New Revision: 5139

Modified:
   trunk/varnish-cache/bin/varnishd/cache_panic.c
   trunk/varnish-cache/bin/varnishd/flint.lnt
   trunk/varnish-cache/bin/varnishd/steps.h
   trunk/varnish-cache/include/http_headers.h
   trunk/varnish-cache/lib/libvcl/generate.py
   trunk/varnish-cache/lib/libvcl/vcc_xref.c
Log:
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.



Modified: trunk/varnish-cache/bin/varnishd/cache_panic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_panic.c	2010-08-26 16:05:35 UTC (rev 5138)
+++ trunk/varnish-cache/bin/varnishd/cache_panic.c	2010-08-27 07:20:57 UTC (rev 5139)
@@ -219,11 +219,9 @@
 	    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);

Modified: trunk/varnish-cache/bin/varnishd/flint.lnt
===================================================================
--- trunk/varnish-cache/bin/varnishd/flint.lnt	2010-08-26 16:05:35 UTC (rev 5138)
+++ trunk/varnish-cache/bin/varnishd/flint.lnt	2010-08-27 07:20:57 UTC (rev 5139)
@@ -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
 

Modified: trunk/varnish-cache/bin/varnishd/steps.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/steps.h	2010-08-26 16:05:35 UTC (rev 5138)
+++ trunk/varnish-cache/bin/varnishd/steps.h	2010-08-27 07:20:57 UTC (rev 5139)
@@ -29,6 +29,7 @@
  * $Id$
  */
 
+/*lint -save -e525 -e539 */
 STEP(wait,	WAIT)
 STEP(first,	FIRST)
 STEP(recv,	RECV)
@@ -42,3 +43,4 @@
 STEP(deliver,	DELIVER)
 STEP(error,	ERROR)
 STEP(done,	DONE)
+/*lint -restore */

Modified: trunk/varnish-cache/include/http_headers.h
===================================================================
--- trunk/varnish-cache/include/http_headers.h	2010-08-26 16:05:35 UTC (rev 5138)
+++ trunk/varnish-cache/include/http_headers.h	2010-08-27 07:20:57 UTC (rev 5139)
@@ -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("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 */

Modified: trunk/varnish-cache/lib/libvcl/generate.py
===================================================================
--- trunk/varnish-cache/lib/libvcl/generate.py	2010-08-26 16:05:35 UTC (rev 5138)
+++ trunk/varnish-cache/lib/libvcl/generate.py	2010-08-27 07:20:57 UTC (rev 5139)
@@ -581,6 +581,8 @@
 
 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 @@
 		p = "| "
 	fo.write("))\n")
 fo.write("#endif\n")
+fo.write("\n/*lint -restore */\n")
 fo.close()
 
 #######################################################################

Modified: trunk/varnish-cache/lib/libvcl/vcc_xref.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_xref.c	2010-08-26 16:05:35 UTC (rev 5138)
+++ trunk/varnish-cache/lib/libvcl/vcc_xref.c	2010-08-27 07:20:57 UTC (rev 5139)
@@ -270,7 +270,7 @@
 	}
 	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 @@
 		}
 #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 @@
 #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);
 		}




More information about the varnish-commit mailing list