]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: quic: Implicit conversion between SSL related enums.
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 2 Mar 2021 09:28:04 +0000 (10:28 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 2 Mar 2021 09:34:18 +0000 (10:34 +0100)
Fix such compilation issues:

include/haproxy/quic_tls.h:157:10: error: implicit conversion from
'enum ssl_encryption_level_t' to 'enum quic_tls_enc_level'
[-Werror=enum-conversion]
  157 |   return ssl_encryption_application;
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/xprt_quic.c: In function 'quic_conn_enc_level_init':
src/xprt_quic.c:2358:13: error: implicit conversion from
'enum quic_tls_enc_level' to 'enum ssl_encryption_level_t'
[-Werror=enum-conversion]
 2358 |  qel->level = quic_to_ssl_enc_level(level);
      |             ^

Not detected by all the compilators.

include/haproxy/quic_tls.h

index 2db41dd22b5150b2a2e0155a423f01aff694da21..01821a7243d31be1db2ca1d7ce8500340baf0058 100644 (file)
@@ -144,7 +144,7 @@ static inline enum quic_tls_enc_level ssl_to_quic_enc_level(enum ssl_encryption_
 }
 
 /* These two following functions map our encryption level to the TLS implementation ones. */
-static inline enum quic_tls_enc_level quic_to_ssl_enc_level(enum quic_tls_enc_level level)
+static inline enum ssl_encryption_level_t quic_to_ssl_enc_level(enum quic_tls_enc_level level)
 {
        switch (level) {
        case QUIC_TLS_ENC_LEVEL_INITIAL: