cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1298?usp=email )
Change subject: ssl: Fix conversion warning in tls_prepend_opcode_v1 ...................................................................... ssl: Fix conversion warning in tls_prepend_opcode_v1 Document assumption with ASSERT. Change-Id: I34584f695ddca3b3e1f2bbcb4380ac91b09c1c8d Signed-off-by: Frank Lichtenheld <[email protected]> Acked-by: Gert Doering <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1298 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg34480.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/ssl.c 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index 896fd65..2d24f5e 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -3962,24 +3962,24 @@ } } +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + void tls_prepend_opcode_v1(const struct tls_multi *multi, struct buffer *buf) { struct key_state *ks = multi->save_ks; - uint8_t op; msg(D_TLS_DEBUG, __func__); ASSERT(ks); + ASSERT(ks->key_id <= P_KEY_ID_MASK); - op = (P_DATA_V1 << P_OPCODE_SHIFT) | ks->key_id; + uint8_t op = (P_DATA_V1 << P_OPCODE_SHIFT) | (uint8_t)ks->key_id; ASSERT(buf_write_prepend(buf, &op, 1)); } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif - void tls_prepend_opcode_v2(const struct tls_multi *multi, struct buffer *buf) { -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1298?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I34584f695ddca3b3e1f2bbcb4380ac91b09c1c8d Gerrit-Change-Number: 1298 Gerrit-PatchSet: 5 Gerrit-Owner: flichtenheld <[email protected]> Gerrit-Reviewer: cron2 <[email protected]> Gerrit-Reviewer: plaisthos <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
