From: Gert Doering Date: Wed, 18 Feb 2026 22:44:31 +0100 Message-ID: <20260218214437.26912-1-gert@...1296...> In-Reply-To: References: MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH v2] ntlm: fix discards 'const' qualifier from pointer target type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: openvpn-devel@lists.sourceforge.net From: Rudi Heitbaum Since glibc-2.43: For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type. fixes: src/openvpn/ntlm.c: In function 'ntlm_phase_3': src/openvpn/ntlm.c:241:15: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 241 | separator = strchr(p->up.username, '\\'); | ^ Change-Id: I2703f15144661f9cadfc8750884db270f3a5bfc6 Signed-off-by: Rudi Heitbaum Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1546 (cherry picked from commit 720c2e97f609bf7bb7e628ddfa7d3e3783afa676) --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to release/2.6. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1546 This mail reflects revision 2 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/ntlm.c b/src/openvpn/ntlm.c index 9191a8b..6da4359 100644 --- a/src/openvpn/ntlm.c +++ b/src/openvpn/ntlm.c @@ -230,7 +230,7 @@ char domain[128]; char username[128]; - char *separator; + const char *separator; bool ntlmv2_enabled = (p->auth_method == HTTP_AUTH_NTLM2);