Skip to content

Commit

Permalink
[build] Add missing "const" qualifiers
Browse files Browse the repository at this point in the history
This fixes "initialization discards 'const' qualifier from pointer
target type" warnings with GCC 5.1.0.

Signed-off-by: Christian Hesse <mail@eworm.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
eworm-de authored and mcb30 committed Apr 24, 2015
1 parent 5744c3e commit bf40b79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/tls.c
Expand Up @@ -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 ) {
Expand Down

0 comments on commit bf40b79

Please sign in to comment.