Mailing List Archive

[master] 30a2df725 Silence FlexeLint
commit 30a2df725bbb701751697f40cb1f14e36707daa2
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Mon Jul 19 15:37:14 2021 +0000

Silence FlexeLint

diff --git a/lib/libvcc/vcc_compile.c b/lib/libvcc/vcc_compile.c
index d270b0ef1..eda2ff1f0 100644
--- a/lib/libvcc/vcc_compile.c
+++ b/lib/libvcc/vcc_compile.c
@@ -82,13 +82,15 @@ vcc_vcl_met2c(struct vsb *vsb, unsigned method)
int d = 0;

//lint -e{774} Boolean within 'if' always evaluates to False
-#define VCL_MET_MAC(l,U,t,b) \
- if (method & VCL_MET_##U) { \
- if (d) \
- VSB_putc(vsb, '|'); \
- VSB_cat(vsb, "VCL_MET_" #U); \
- d = 1; \
- }
+#define VCL_MET_MAC(l,U,t,b) \
+ do { \
+ if (method & VCL_MET_##U) { \
+ if (d) \
+ VSB_putc(vsb, '|'); \
+ VSB_cat(vsb, "VCL_MET_" #U); \
+ d = 1; \
+ } \
+ } while (0);
#include "tbl/vcl_returns.h"
AN(d);
}
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit