0df48ac87b
gcc5 fixes OBS-URL: https://build.opensuse.org/request/show/308836 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=261
35 lines
1.1 KiB
Diff
35 lines
1.1 KiB
Diff
From bf40b79734a070cea4dd4c74b50d3bf73fdc6061 Mon Sep 17 00:00:00 2001
|
|
From: Christian Hesse <mail@eworm.de>
|
|
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 <mail@eworm.de>
|
|
Modified-by: Michael Brown <mcb30@ipxe.org>
|
|
Signed-off-by: Michael Brown <mcb30@ipxe.org>
|
|
---
|
|
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
|
|
|