]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Compilation fix for quic_rx_packet_refinc()
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 8 Dec 2021 14:24:15 +0000 (15:24 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 8 Dec 2021 14:30:02 +0000 (15:30 +0100)
This was reported by the CI wich clang as compilator.

    In file included from src/ssl_sock.c:80:
    include/haproxy/xprt_quic.h:1100:50: error: passing 'int *' to parameter of
    type 'unsigned int *' converts between pointers to integer types with
    different sign [-Werror,-Wpointer-sign]
        } while (refcnt && !HA_ATOMIC_CAS(&pkt->refcnt, &refcnt, refcnt - 1));
                                                        ^~~~~~~

include/haproxy/xprt_quic.h

index 57426880848ef87ae521b641aed9ebb2e5160417..97625b4406bfd26190db7eb8f2d365ea4c7a6079 100644 (file)
@@ -1093,7 +1093,7 @@ static inline void quic_rx_packet_refinc(struct quic_rx_packet *pkt)
 /* Decrement the reference counter of <pkt> while remaining positive */
 static inline void quic_rx_packet_refdec(struct quic_rx_packet *pkt)
 {
-       int refcnt;
+       unsigned int refcnt;
 
        do {
                refcnt = HA_ATOMIC_LOAD(&pkt->refcnt);