]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: quic: Move an ASSUME_NONNULL() for variable which is not null
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 21 Jan 2025 15:26:42 +0000 (16:26 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 21 Jan 2025 21:01:34 +0000 (22:01 +0100)
commit1f099db7e2ca978b467f0d524261af1d588d1d0a
tree3d705c37431bd39ede738970a9f623eed64daf0e
parent4f38c4bfd8c07331258b4b13111a07c7b3013021
BUILD: quic: Move an ASSUME_NONNULL() for variable which is not null

Some new compilers warn that <oldest_lost> variable can be null even this cannot be
the case as mentioned by the comment about an already present ASSUME_NONNULL()
call comment as follows:

src/quic_loss.c: In function ‘qc_release_lost_pkts’:
src/quic_loss.c:307:86: error: potential null pointer dereference [-Werror=null-dereference]
  307 |   unsigned int period = newest_lost->time_sent_ms - oldest_lost->time_sent_ms;
      |                                                     ~~~~~~~~~~~^~~~~~~~~~~~~~

Move up this ASSUME_NONNULL() statement to please these compiler.

Must be backported as far as 2.6 to easy any further backport around this code part.
src/quic_loss.c