From 3a6287d72675ed9a3a0daf4adb9fe92dfd217f9d Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 4 Sep 2023 00:29:48 +0000 Subject: [PATCH] lib: silence compiler warning in inet_ntop6 ``` ./curl/lib/inet_ntop.c:121:21: warning: possible misuse of comma operator here [-Wcomma] cur.base = i, cur.len = 1; ^ ./curl/lib/inet_ntop.c:121:9: note: cast expression to void to silence warning cur.base = i, cur.len = 1; ^~~~~~~~~~~~ (void)( ) ``` Closes #11790 --- lib/inet_ntop.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/inet_ntop.c b/lib/inet_ntop.c index fa9077376b..135f4866c6 100644 --- a/lib/inet_ntop.c +++ b/lib/inet_ntop.c @@ -117,8 +117,9 @@ static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) for(i = 0; i < (IN6ADDRSZ / INT16SZ); i++) { if(words[i] == 0) { - if(cur.base == -1) - cur.base = i, cur.len = 1; + if(cur.base == -1) { + cur.base = i; cur.len = 1; + } else cur.len++; } -- 2.47.3