From 08064bc03bc412a32e2952a415730df4a33cf8f1 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Wed, 29 Jul 2026 09:07:30 +0530 Subject: [PATCH] TLS: Avoid discarded-qualifiers Just a build issue fix depending on GCC5+ configuration, fixes: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] return discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] Signed-off-by: Richard Allen --- components/wpa_supplicant/src/tls/tlsv1_client.c | 2 +- components/wpa_supplicant/src/tls/x509v3.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/wpa_supplicant/src/tls/tlsv1_client.c b/components/wpa_supplicant/src/tls/tlsv1_client.c index 431044c57be..0444310215e 100644 --- a/components/wpa_supplicant/src/tls/tlsv1_client.c +++ b/components/wpa_supplicant/src/tls/tlsv1_client.c @@ -614,7 +614,7 @@ int tlsv1_client_prf(struct tlsv1_client *conn, const char *label, int tlsv1_client_get_cipher(struct tlsv1_client *conn, char *buf, size_t buflen) { - char *cipher; + const char *cipher; switch (conn->rl.cipher_suite) { case TLS_RSA_WITH_RC4_128_MD5: diff --git a/components/wpa_supplicant/src/tls/x509v3.c b/components/wpa_supplicant/src/tls/x509v3.c index 1bbd80ade8d..5695006104a 100644 --- a/components/wpa_supplicant/src/tls/x509v3.c +++ b/components/wpa_supplicant/src/tls/x509v3.c @@ -459,7 +459,7 @@ int x509_parse_name(const u8 *buf, size_t len, struct x509_name *name, } -static char * x509_name_attr_str(enum x509_name_attr_type type) +static const char * x509_name_attr_str(enum x509_name_attr_type type) { switch (type) { case X509_NAME_ATTR_NOT_USED: