[master] a3c3181 Move a bit of FlexeLintery up to vdef.h
Poul-Henning Kamp
phk at FreeBSD.org
Tue Feb 9 01:19:12 CET 2016
commit a3c3181cc40a4dc6aba8d0ac3695472ed5e770ca
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Feb 8 21:21:18 2016 +0000
Move a bit of FlexeLintery up to vdef.h
diff --git a/bin/varnishd/cache/cache_mempool.c b/bin/varnishd/cache/cache_mempool.c
index 472441c..f4c1c30 100644
--- a/bin/varnishd/cache/cache_mempool.c
+++ b/bin/varnishd/cache/cache_mempool.c
@@ -96,7 +96,7 @@ mpl_guard(void *priv)
{
struct mempool *mpl;
struct memitem *mi = NULL;
- double mpl_slp __state_variable__(mpl_slp);
+ double __state_variable__(mpl_slp);
double last = 0;
CAST_OBJ_NOTNULL(mpl, priv, MEMPOOL_MAGIC);
diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index 0b494c3..9f21257 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -42,17 +42,6 @@
struct cli;
-/**********************************************************************
- * FlexeLint and compiler shutuppery
- */
-
-/*
- * State variables may change value before we use the last value we
- * set them to.
- * Pass no argument.
- */
-#define __state_variable__(xxx) /*lint -esym(838,xxx) */
-
/**********************************************************************/
/* Name of transient storage */
diff --git a/include/vdef.h b/include/vdef.h
index 0790e43..bf5d3f4 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -78,6 +78,12 @@
*/
#define __match_proto__(xxx) /*lint -e{818} */
+/*
+ * State variables may change value before we have considered the
+ * previous value
+ */
+#define __state_variable__(varname) varname /*lint -esym(838,varname) */
+
#define NEEDLESS_RETURN return
#endif /* VDEF_H_INCLUDED */
More information about the varnish-commit
mailing list