From 398a9e1badc623971193b05019c20395336da4a9 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 18 Aug 2020 11:32:44 +0100 Subject: [PATCH] coverity: 62134: protect debug-only statement with preprocessor conditional Compiler has no problem with it but coverity complains nobody uses p in release build --- lib/roles/h2/hpack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/roles/h2/hpack.c b/lib/roles/h2/hpack.c index 2038d2f17..413f454da 100644 --- a/lib/roles/h2/hpack.c +++ b/lib/roles/h2/hpack.c @@ -333,9 +333,11 @@ static void lws_dump_header(struct lws *wsi, int hdr) strcpy(s, "(too big to show)"); else s[len] = '\0'; +#if defined(_DEBUG) p = lws_token_to_string(hdr); lwsl_header(" hdr tok %d (%s) = '%s' (len %d)\n", hdr, p ? (char *)p : (char *)"null", s, len); +#endif } /*