]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: quic: Compilation fixes for some gcc warnings with -O1
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 3 Jul 2023 12:31:13 +0000 (14:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 3 Jul 2023 12:50:54 +0000 (14:50 +0200)
commitf4d9fa4089e6bd5c3c79501fcc5dbfa6af3cb3dc
tree4dab62d8d1fe51a6098004b7617084bcadd061f0
parent74058745556a59d112914d6cf33f337d8d435cd7
BUILD: quic: Compilation fixes for some gcc warnings with -O1

This is to prevent the build from these gcc warning when compiling with -O1 option:

  willy@wtap:haproxy$ sh make-native-quic-memstat src/quic_conn.o CPU_CFLAGS="-O1"
    CC      src/quic_conn.o
  src/quic_conn.c: In function 'qc_prep_pkts':
  src/quic_conn.c:3700:44: warning: potential null pointer dereference [-Wnull-dereference]
   3700 |                                 frms = &qel->pktns->tx.frms;
        |                                         ~~~^~~~~~~
  src/quic_conn.c:3626:33: warning: 'end' may be used uninitialized in this function [-Wmaybe-uninitialized]
   3626 |                         if (end - pos < QUIC_INITIAL_PACKET_MINLEN) {
        |                             ~~~~^~~~~
src/quic_conn.c