]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: qpack: suppress by default stdout traces
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 25 Mar 2022 13:56:51 +0000 (14:56 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 25 Mar 2022 14:22:40 +0000 (15:22 +0100)
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
src/qpack-dec.c

index 9e861a292314b3ec7c7ee132a92b0fdf61cb0b90..0c511bcb193176e3b97ee9ac4b8955b06e90e50e 100644 (file)
--- 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
index ed43baebc831ee9a852c4d4e0f9d4ed717d28d72..166e1ae2aa79ca0548d30260367cbab76189ecee 100644 (file)
@@ -35,9 +35,7 @@
 #include <haproxy/http-hdr.h>
 #include <haproxy/tools.h>
 
-#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;