]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: mux-spop: fix build failure on gcc 4-10 and clang
authorWilly Tarreau <w@1wt.eu>
Mon, 15 Jul 2024 17:16:58 +0000 (19:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 15 Jul 2024 17:19:13 +0000 (19:19 +0200)
A label at end of block was added in mux_spop.c in function
spop_conn_update_timeout() by commit 7e1bb7283b ("MEDIUM: mux-spop:
Introduce the SPOP multiplexer"). This is normally not permitted,
so gcc-4 to 10 and clang whine about it:

    CC      src/mux_spop.o
  src/mux_spop.c: In function 'spop_conn_update_timeout':
  src/mux_spop.c:899:2: error: label at end of compound statement
    899 |  leave:
        |  ^~~~~

Let's just add a return there to make the compiler happy. No backport
is needed.

src/mux_spop.c

index ede6e8ebcbf14224e8a8191b1bb958122def2fca..901695769cf8afc7d170abab7646ad7339181dc2 100644 (file)
@@ -897,6 +897,7 @@ static void spop_conn_update_timeout(struct spop_conn *spop_conn)
        task_queue(spop_conn->task);
        TRACE_LEAVE(SPOP_EV_SPOP_CONN_WAKE, spop_conn->conn, 0, 0, (size_t[]){spop_conn->task->expire});
  leave:
+       return;
 }
 
 /********************************************************/