Browse Source

[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 <mail@eworm.de>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Christian Hesse 9 years ago
parent
commit
bf40b79734
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/net/tls.c

+ 2
- 2
src/net/tls.c View File

@@ -1637,9 +1637,9 @@ static int tls_new_handshake ( struct tls_session *tls,
1637 1637
 			uint8_t length[3];
1638 1638
 			uint8_t payload[0];
1639 1639
 		} __attribute__ (( packed )) *handshake = data;
1640
-		void *payload = &handshake->payload;
1640
+		const void *payload = &handshake->payload;
1641 1641
 		size_t payload_len = tls_uint24 ( handshake->length );
1642
-		void *next = ( payload + payload_len );
1642
+		const void *next = ( payload + payload_len );
1643 1643
 
1644 1644
 		/* Sanity check */
1645 1645
 		if ( next > end ) {

Loading…
Cancel
Save