[master] 7123e16d8 Found the root cause, clear flint bug.

Poul-Henning Kamp phk at FreeBSD.org
Wed Jul 7 10:18:04 UTC 2021


commit 7123e16d8013f6a447a8ef5561f2a7b9340d6f42
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jul 7 10:17:14 2021 +0000

    Found the root cause, clear flint bug.

diff --git a/flint.lnt b/flint.lnt
index 0bc076fce..53126a529 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -9,6 +9,8 @@
 //d__flexelint_v9__=1
 +fan
 
+-hm4
+
 ///////////////////////////////////////////////////////////////////////
 // electives
 //+e9*
@@ -60,7 +62,12 @@
 ///////////////////////////////////////////////////////////////////////
 
 
--emacro((835),*)	// A zero has been given as ___ argument to operator '___
+// This does not work with pcre2.h, the injected /* lint ... */ comments
+// interfere with macro argument concatenation.  Clear flexelint bug
+// because it does not happen when run with -p
+// -emacro((835),*)	// A zero has been given as ___ argument to operator '___
+
+-e835	// A zero has been given as ___ argument to operator '___
 
 ///////////////////////////////////////////////////////////////////////
 // build/config related
diff --git a/tools/flint_skel.sh b/tools/flint_skel.sh
index d6d3031f1..dad674362 100755
--- a/tools/flint_skel.sh
+++ b/tools/flint_skel.sh
@@ -18,15 +18,6 @@ fi
 
 IARG="${IARG} -I/usr/local/include"
 
-# Flexelint do not grok the macro-stacking in pcre2.h
-# Solve it by running it through CPP first.
-
-echo '
-#include "config.h"
-#include <pcre2.h>
-' | cc $IARG -E - |
-    sed '/^# [0-9]/d' > pcre2.h
-
 flexelint \
 	-D__FLEXELINT__ \
 	$(if [ $l -eq 2 ] ; then echo ../../flint.lnt ; fi) \
@@ -38,8 +29,6 @@ flexelint \
 	$FLOPS \
 	2>&1 | tee _.fl
 
-rm -f pcre2.h
-
 if [ -f _.fl.old ] ; then
 	diff -u _.fl.old _.fl
 fi


More information about the varnish-commit mailing list