cron2 has uploaded a new patch set (#2) to the change originally created by
flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1542?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2
Change subject: dns: fix discards 'const' qualifier from pointer target type
......................................................................
dns: fix discards 'const' qualifier from pointer target type
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/dns.c: In function 'dns_server_addr_parse':
src/openvpn/dns.c:67:25: warning: initialization discards 'const' qualifier
from pointer target type [-Wdiscarded-qualifiers]
67 | char *first_colon = strchr(addr, ':');
| ^~~~~~
src/openvpn/dns.c:68:24: warning: initialization discards 'const' qualifier
from pointer target type [-Wdiscarded-qualifiers]
68 | char *last_colon = strrchr(addr, ':');
| ^~~~~~~
Change-Id: I262705189edfbd9aa9a32bcd712840fffa592435
Signed-off-by: Rudi Heitbaum <[email protected]>
Acked-by: Gert Doering <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1542
Acked-by: Frank Lichtenheld <[email protected]>
Message-Id: <[email protected]>
URL:
https://www.mail-archive.com/[email protected]/msg35730.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/dns.c
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/42/1542/2
diff --git a/src/openvpn/dns.c b/src/openvpn/dns.c
index 3d24050..747c0db 100644
--- a/src/openvpn/dns.c
+++ b/src/openvpn/dns.c
@@ -45,7 +45,7 @@
* @return True if parsing was successful
*/
static bool
-dns_server_port_parse(in_port_t *port, char *port_str)
+dns_server_port_parse(in_port_t *port, const char *port_str)
{
char *endptr;
errno = 0;
@@ -71,8 +71,8 @@
in_port_t port = 0;
sa_family_t af;
- char *first_colon = strchr(addr, ':');
- char *last_colon = strrchr(addr, ':');
+ const char *first_colon = strchr(addr, ':');
+ const char *last_colon = strrchr(addr, ':');
if (!first_colon || first_colon == last_colon)
{
@@ -93,7 +93,7 @@
if (addr[0] == '[')
{
addr += 1;
- char *bracket = last_colon - 1;
+ const char *bracket = last_colon - 1;
if (*bracket != ']' || bracket == addr ||
!dns_server_port_parse(&port, last_colon + 1))
{
return false;
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1542?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I262705189edfbd9aa9a32bcd712840fffa592435
Gerrit-Change-Number: 1542
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel