From d96361b2703a6364c1116af76016f09807b4c65b Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Fri, 25 Mar 2022 14:56:51 +0100 Subject: [PATCH] CLEANUP: qpack: suppress by default stdout traces Remove the definition of DEBUG_HPACK on qpack-dec.c which forces the QPACK decoding traces on stderr. Also change the name to use a dedicated one for QPACK decoding as DEBUG_QPACK. --- Makefile | 2 +- src/qpack-dec.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9e861a2923..0c511bcb19 100644 --- a/Makefile +++ b/Makefile @@ -257,7 +257,7 @@ SMALL_OPTS = # DEBUG_MEM_STATS, DEBUG_DONT_SHARE_POOLS, DEBUG_FD, DEBUG_POOL_INTEGRITY, # DEBUG_NO_POOLS, DEBUG_FAIL_ALLOC, DEBUG_STRICT_ACTION=[0-3], DEBUG_HPACK, # DEBUG_AUTH, DEBUG_SPOE, DEBUG_UAF, DEBUG_THREAD, DEBUG_STRICT, DEBUG_DEV, -# DEBUG_TASK, DEBUG_MEMORY_POOLS, DEBUG_POOL_TRACING. +# DEBUG_TASK, DEBUG_MEMORY_POOLS, DEBUG_POOL_TRACING, DEBUG_QPACK. DEBUG = -DDEBUG_STRICT -DDEBUG_MEMORY_POOLS #### Trace options diff --git a/src/qpack-dec.c b/src/qpack-dec.c index ed43baebc8..166e1ae2aa 100644 --- a/src/qpack-dec.c +++ b/src/qpack-dec.c @@ -35,9 +35,7 @@ #include #include -#define DEBUG_HPACK - -#if defined(DEBUG_HPACK) +#if defined(DEBUG_QPACK) #define qpack_debug_printf fprintf #define qpack_debug_hexdump debug_hexdump #else @@ -207,7 +205,7 @@ int qpack_decode_fs(const unsigned char *raw, size_t len, struct buffer *tmp, if (efl_type == QPACK_LFL_WPBNM) { /* Literal field line with post-base name reference */ uint64_t index __maybe_unused, length; - unsigned int n __maybe_unused, h; + unsigned int n __maybe_unused, h __maybe_unused; qpack_debug_printf(stderr, "literal field line with post-base name reference:"); n = *raw & 0x08;