From 36afa2772f7bc9b3239c53fe5d6b3d57a039c799 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 12 Jun 2026 18:43:04 +0200 Subject: [PATCH] lib1960.c unconst ``` home/runner/work/curl/curl/tests/libtest/lib1960.c:66:44: error: cast discards 'const' qualifier from pointer target type [-Werror=cast-qual] #define my_inet_pton(x, y, z) inet_pton(x, (unsigned char *)y, z) ^ /home/runner/work/curl/curl/tests/libtest/lib1960.c:107:6: note: in expansion of macro 'my_inet_pton' if(my_inet_pton(AF_INET, libtest_arg2, &serv_addr.sin_addr) <= 0) { ^~~~~~~~~~~~ ``` https://github.com/curl/curl/actions/runs/27428676624/job/81073057087 --- tests/libtest/lib1960.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/libtest/lib1960.c b/tests/libtest/lib1960.c index 2ce9a7540d..ae1f989840 100644 --- a/tests/libtest/lib1960.c +++ b/tests/libtest/lib1960.c @@ -63,7 +63,7 @@ static int sockopt_cb(void *clientp, } #ifdef __AMIGA__ -#define my_inet_pton(x, y, z) inet_pton(x, (unsigned char *)y, z) +#define my_inet_pton(x, y, z) inet_pton(x, (unsigned char *)CURL_UNCONST(y), z) #else #define my_inet_pton(x, y, z) inet_pton(x, y, z) #endif