]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: compression: remove a build warning
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Nov 2012 16:49:37 +0000 (17:49 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Nov 2012 16:49:37 +0000 (17:49 +0100)
gcc emits this warning while building free_zlib() :
  src/compression.c: In function `free_zlib':
  src/compression.c:403: warning: 'pool' might be used uninitialized in this function

This is not a bug as the pool cannot take other values, but let's
pre-initialize is to null to fix the warning.

src/compression.c

index ae43cd3759405145b1bc85887d3f4956b380c57d..983e77136c37534bfeab94f0de191c5d76e56f86 100644 (file)
@@ -400,7 +400,7 @@ end:
 static void free_zlib(void *opaque, void *ptr)
 {
        struct comp_ctx *ctx = opaque;
-       struct pool_head *pool;
+       struct pool_head *pool = NULL;
 
        if (ptr == ctx->zlib_window)
                pool = zlib_pool_window;