BUILD: compression: remove a warning when no compression lib is used
This warning appears when building without any compression library :
src/compression.c:143:19: warning: unused function 'init_comp_ctx' [-Wunused-function]
static inline int init_comp_ctx(struct comp_ctx **comp_ctx)
^
src/compression.c:176:19: warning: unused function 'deinit_comp_ctx' [-Wunused-function]
static inline int deinit_comp_ctx(struct comp_ctx **comp_ctx)
No backport is needed.
diff --git a/src/compression.c b/src/compression.c
index 4e13bae..02ff724 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -56,7 +56,6 @@
#endif
unsigned int compress_min_idle = 0;
-static struct pool_head *pool_comp_ctx = NULL;
static int identity_init(struct comp_ctx **comp_ctx, int level);
static int identity_add_data(struct comp_ctx *comp_ctx, const char *in_data, int in_len, struct buffer *out);
@@ -137,6 +136,8 @@
return -1;
}
+#if defined(USE_ZLIB) || defined(USE_SLZ)
+static struct pool_head *pool_comp_ctx = NULL;
/*
* Alloc the comp_ctx
*/
@@ -186,6 +187,7 @@
#endif
return 0;
}
+#endif
/****************************