[master] 23a0536 Make NEEDLESS_RETURN a blank macro so it can also be used without a return value.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Feb 2 08:52:11 CET 2016
commit 23a053635cd3970e6147d626050066702becbcee
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Feb 2 07:44:06 2016 +0000
Make NEEDLESS_RETURN a blank macro so it can also be used without
a return value.
diff --git a/bin/varnishd/flint.lnt b/bin/varnishd/flint.lnt
index 200e37b..cba5eb1 100644
--- a/bin/varnishd/flint.lnt
+++ b/bin/varnishd/flint.lnt
@@ -104,8 +104,6 @@
+libh mgt_event.h
--emacro(527, NEEDLESS_RETURN) // unreachable code
-
-sem(BAN_Free, custodial(1))
-sem(EXP_Inject, custodial(1))
-sem(HSH_Insert, custodial(3))
diff --git a/flint.lnt b/flint.lnt
index c6824f5..1dcb478 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -93,6 +93,11 @@
-emacro(740, VTAILQ_PREV) // Unusual pointer cast (incompatible indirect types)
///////////////////////////////////////////////////////////////////////
+// <vdef.h>
+-emacro(527, NEEDLESS_RETURN) // unreachable code
+
+///////////////////////////////////////////////////////////////////////
+
-esym(785,VSL_tags) // Sparse array
diff --git a/include/vdef.h b/include/vdef.h
index a015b05..0790e43 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -78,6 +78,6 @@
*/
#define __match_proto__(xxx) /*lint -e{818} */
-#define NEEDLESS_RETURN(foo) return (foo)
+#define NEEDLESS_RETURN return
#endif /* VDEF_H_INCLUDED */
More information about the varnish-commit
mailing list