From: Frédéric Lécaille Date: Tue, 2 Mar 2021 09:28:04 +0000 (+0100) Subject: BUILD: quic: Implicit conversion between SSL related enums. X-Git-Tag: v2.4-dev11~52 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b28812af7aa933867d72f818c75fc56f2afabcb9;p=thirdparty%2Fhaproxy.git BUILD: quic: Implicit conversion between SSL related enums. 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. --- diff --git a/include/haproxy/quic_tls.h b/include/haproxy/quic_tls.h index 2db41dd22b..01821a7243 100644 --- a/include/haproxy/quic_tls.h +++ b/include/haproxy/quic_tls.h @@ -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: