clang analyzer was unable to detect that at either the `request` or
the `response` case must match (this is ensured in line 455/456).
---
src/proxy.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/proxy.c b/src/proxy.c
index 731f5e2a6..97ae0fd55 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -498,11 +498,15 @@ static int proxy_parse_declare(char **args, int section,
struct proxy *curpx,
hdr->index = curpx->nb_req_cap++;
curpx->req_cap = hdr;
}
- if (strcmp(args[2], "response") == 0) {
+ else if (strcmp(args[2], "response") == 0) {
hdr->next = curpx->rsp_cap;
hdr->index = curpx->nb_rsp_cap++;
curpx->rsp_cap = hdr;
}
+ else {
+ BUG_ON(1);
+ }
+
return 0;
}
else {
--
2.21.0