Mailing List Archive

[master] 493415482 vmin/vmax vs. flexelint
commit 493415482be82f02543ce7719bae066a1e674db2
Author: Nils Goroll <nils.goroll@uplex.de>
Date: Wed Nov 10 11:07:05 2021 +0100

vmin/vmax vs. flexelint

diff --git a/flint.lnt b/flint.lnt
index 53126a529..d20948346 100644
--- a/flint.lnt
+++ b/flint.lnt
@@ -241,6 +241,8 @@
///////////////////////////////////////////////////////////////////////
// <vdef.h>
-emacro(527, NEEDLESS) // unreachable code
+-emacro(160, _vtake) // The sequence '( {' is non standard
++rw( __typeof__ )

///////////////////////////////////////////////////////////////////////
// <libvarnishapi>
diff --git a/include/vdef.h b/include/vdef.h
index 9b1043669..faa4877c4 100644
--- a/include/vdef.h
+++ b/include/vdef.h
@@ -180,6 +180,10 @@ int __llvm_gcov_flush(void);
# define VUNIQ_NAME(base) VCOMBINE(base, __LINE__, 0)
#endif

+#ifdef _lint
+#define typeof(x) __typeof__(x)
+#endif
+
/* ref: https://gcc.gnu.org/onlinedocs/gcc/Typeof.html */

#define _vtake(op, ta, tb, a, b, _va, _vb) \
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit