From bf40b79734a070cea4dd4c74b50d3bf73fdc6061 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 23 Apr 2015 13:33:25 +0200 Subject: [PATCH] [build] Add missing "const" qualifiers This fixes "initialization discards 'const' qualifier from pointer target type" warnings with GCC 5.1.0. Signed-off-by: Christian Hesse Modified-by: Michael Brown Signed-off-by: Michael Brown --- src/net/tls.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/tls.c b/src/net/tls.c index 30ccc93..8f4bec7 100644 --- a/src/net/tls.c +++ b/src/net/tls.c @@ -1637,9 +1637,9 @@ static int tls_new_handshake ( struct tls_session *tls, uint8_t length[3]; uint8_t payload[0]; } __attribute__ (( packed )) *handshake = data; - void *payload = &handshake->payload; + const void *payload = &handshake->payload; size_t payload_len = tls_uint24 ( handshake->length ); - void *next = ( payload + payload_len ); + const void *next = ( payload + payload_len ); /* Sanity check */ if ( next > end ) { -- 1.7.0.4