[mod_extforward] quiet clang compiler warning

It does seem possible for PROXY protocol subelements to be misaligned
and a message has been sent to HAProxy author of the PROXY protocol.

On most modern processors and operating systems, misaligned access has a
cost, but not the outrageous cost that it historical had on processors
and older operating systems such as on SPARC processors running Solaris
prior to Solaris 11.
Glenn Strauss 6 years ago
parent 21081c7b72
commit b298e2acb0

@ -1520,7 +1520,8 @@ static int mod_extforward_hap_PROXY_v2 (connection * const con,
static const uint32_t zero = 0;
handler_ctx *hctx =
struct pp2_tlv_ssl *tlv_ssl = (struct pp2_tlv_ssl *)((char *)tlv+3);
struct pp2_tlv_ssl *tlv_ssl =
(struct pp2_tlv_ssl *)(void *)((char *)tlv+3);
struct pp2_tlv *subtlv = tlv;
if (tlv_ssl->client & PP2_CLIENT_SSL) {
buffer_copy_string_len(con->proto, CONST_STR_LEN("https"));