]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/BUILD: debug: fix unused variable error
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Mar 2024 16:17:35 +0000 (17:17 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 29 Mar 2024 16:21:04 +0000 (17:21 +0100)
A compilation error occurs when using DEBUG_MEM_STATS due to a variable
now being unused in debug_iohandler_memstats() :

src/debug.c: In function ‘debug_iohandler_memstats’:
src/debug.c:1862:24: error: unused variable ‘sc’ [-Werror=unused-variable]
 1862 |         struct stconn *sc = appctx_sc(appctx);
      |                        ^~

This is caused since the following commit :
  94b8ed446f70a381dde0ea2dc891b62fcc3cc8e1
  MEDIUM: cli/applet: Stop to test opposite SC in I/O handler of CLI commands

This must not be backported.

src/debug.c

index 7420c999b9f998d12dd88571565dbc7e4cc34173..b190f700933ee6b30e0a4b04339b7d89eb1be666 100644 (file)
@@ -1859,7 +1859,6 @@ static int debug_parse_cli_memstats(char **args, char *payload, struct appctx *a
 static int debug_iohandler_memstats(struct appctx *appctx)
 {
        struct dev_mem_ctx *ctx = appctx->svcctx;
-       struct stconn *sc = appctx_sc(appctx);
        struct mem_stats *ptr;
        const char *pfx = ctx->match;
        int ret = 1;