From cd586149d5609e8b564fe8fc45ccbcb14c3b25ea Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 29 Jul 2025 11:27:48 +0200 Subject: [PATCH] tests: constify command-line arguments For libtests, tunits, units. Also: - lib3033: tidy up headers. - lib/netrc: constify an arg in `Curl_parsenetrc()`. Closes #18076 --- lib/netrc.c | 2 +- lib/netrc.h | 3 ++- tests/libtest/first.c | 14 +++++++------- tests/libtest/first.h | 10 +++++----- tests/libtest/lib1156.c | 2 +- tests/libtest/lib1301.c | 2 +- tests/libtest/lib1308.c | 2 +- tests/libtest/lib1485.c | 2 +- tests/libtest/lib1500.c | 2 +- tests/libtest/lib1501.c | 2 +- tests/libtest/lib1502.c | 2 +- tests/libtest/lib1506.c | 6 +++--- tests/libtest/lib1507.c | 2 +- tests/libtest/lib1508.c | 2 +- tests/libtest/lib1509.c | 2 +- tests/libtest/lib1510.c | 6 +++--- tests/libtest/lib1511.c | 2 +- tests/libtest/lib1512.c | 6 +++--- tests/libtest/lib1513.c | 2 +- tests/libtest/lib1514.c | 2 +- tests/libtest/lib1515.c | 10 +++++----- tests/libtest/lib1517.c | 2 +- tests/libtest/lib1518.c | 2 +- tests/libtest/lib1520.c | 2 +- tests/libtest/lib1522.c | 2 +- tests/libtest/lib1523.c | 2 +- tests/libtest/lib1525.c | 2 +- tests/libtest/lib1526.c | 2 +- tests/libtest/lib1527.c | 2 +- tests/libtest/lib1528.c | 2 +- tests/libtest/lib1529.c | 2 +- tests/libtest/lib1530.c | 2 +- tests/libtest/lib1531.c | 2 +- tests/libtest/lib1532.c | 2 +- tests/libtest/lib1533.c | 2 +- tests/libtest/lib1534.c | 2 +- tests/libtest/lib1535.c | 2 +- tests/libtest/lib1536.c | 2 +- tests/libtest/lib1537.c | 2 +- tests/libtest/lib1538.c | 2 +- tests/libtest/lib1540.c | 2 +- tests/libtest/lib1541.c | 2 +- tests/libtest/lib1542.c | 2 +- tests/libtest/lib1545.c | 2 +- tests/libtest/lib1550.c | 2 +- tests/libtest/lib1551.c | 2 +- tests/libtest/lib1552.c | 2 +- tests/libtest/lib1553.c | 2 +- tests/libtest/lib1554.c | 2 +- tests/libtest/lib1555.c | 2 +- tests/libtest/lib1556.c | 2 +- tests/libtest/lib1557.c | 2 +- tests/libtest/lib1558.c | 2 +- tests/libtest/lib1559.c | 2 +- tests/libtest/lib1560.c | 2 +- tests/libtest/lib1564.c | 2 +- tests/libtest/lib1565.c | 4 ++-- tests/libtest/lib1567.c | 2 +- tests/libtest/lib1568.c | 2 +- tests/libtest/lib1569.c | 2 +- tests/libtest/lib1571.c | 2 +- tests/libtest/lib1576.c | 2 +- tests/libtest/lib1591.c | 2 +- tests/libtest/lib1592.c | 2 +- tests/libtest/lib1593.c | 2 +- tests/libtest/lib1594.c | 2 +- tests/libtest/lib1597.c | 2 +- tests/libtest/lib1598.c | 2 +- tests/libtest/lib1599.c | 2 +- tests/libtest/lib1662.c | 2 +- tests/libtest/lib1900.c | 2 +- tests/libtest/lib1901.c | 2 +- tests/libtest/lib1903.c | 2 +- tests/libtest/lib1905.c | 2 +- tests/libtest/lib1906.c | 2 +- tests/libtest/lib1907.c | 2 +- tests/libtest/lib1908.c | 2 +- tests/libtest/lib1910.c | 2 +- tests/libtest/lib1911.c | 2 +- tests/libtest/lib1912.c | 2 +- tests/libtest/lib1913.c | 2 +- tests/libtest/lib1915.c | 2 +- tests/libtest/lib1916.c | 2 +- tests/libtest/lib1918.c | 2 +- tests/libtest/lib1919.c | 2 +- tests/libtest/lib1933.c | 2 +- tests/libtest/lib1934.c | 2 +- tests/libtest/lib1935.c | 2 +- tests/libtest/lib1936.c | 2 +- tests/libtest/lib1937.c | 2 +- tests/libtest/lib1938.c | 2 +- tests/libtest/lib1939.c | 2 +- tests/libtest/lib1940.c | 2 +- tests/libtest/lib1945.c | 2 +- tests/libtest/lib1947.c | 2 +- tests/libtest/lib1948.c | 2 +- tests/libtest/lib1955.c | 2 +- tests/libtest/lib1956.c | 2 +- tests/libtest/lib1957.c | 2 +- tests/libtest/lib1958.c | 2 +- tests/libtest/lib1959.c | 2 +- tests/libtest/lib1960.c | 4 ++-- tests/libtest/lib1964.c | 2 +- tests/libtest/lib1970.c | 2 +- tests/libtest/lib1971.c | 2 +- tests/libtest/lib1972.c | 2 +- tests/libtest/lib1973.c | 2 +- tests/libtest/lib1974.c | 2 +- tests/libtest/lib1975.c | 2 +- tests/libtest/lib1977.c | 2 +- tests/libtest/lib1978.c | 2 +- tests/libtest/lib2023.c | 2 +- tests/libtest/lib2032.c | 2 +- tests/libtest/lib2082.c | 2 +- tests/libtest/lib2301.c | 2 +- tests/libtest/lib2302.c | 2 +- tests/libtest/lib2304.c | 2 +- tests/libtest/lib2306.c | 2 +- tests/libtest/lib2308.c | 2 +- tests/libtest/lib2309.c | 2 +- tests/libtest/lib2402.c | 6 +++--- tests/libtest/lib2404.c | 6 +++--- tests/libtest/lib2405.c | 7 ++++--- tests/libtest/lib2502.c | 6 +++--- tests/libtest/lib2700.c | 2 +- tests/libtest/lib3010.c | 2 +- tests/libtest/lib3025.c | 2 +- tests/libtest/lib3026.c | 6 +++--- tests/libtest/lib3027.c | 2 +- tests/libtest/lib3033.c | 11 ++++++----- tests/libtest/lib3100.c | 2 +- tests/libtest/lib3101.c | 2 +- tests/libtest/lib3102.c | 2 +- tests/libtest/lib3103.c | 2 +- tests/libtest/lib3104.c | 2 +- tests/libtest/lib3105.c | 2 +- tests/libtest/lib3207.c | 2 +- tests/libtest/lib3208.c | 2 +- tests/libtest/lib500.c | 2 +- tests/libtest/lib501.c | 2 +- tests/libtest/lib502.c | 2 +- tests/libtest/lib503.c | 2 +- tests/libtest/lib504.c | 2 +- tests/libtest/lib505.c | 2 +- tests/libtest/lib506.c | 2 +- tests/libtest/lib507.c | 2 +- tests/libtest/lib508.c | 2 +- tests/libtest/lib509.c | 2 +- tests/libtest/lib510.c | 2 +- tests/libtest/lib511.c | 2 +- tests/libtest/lib512.c | 2 +- tests/libtest/lib513.c | 2 +- tests/libtest/lib514.c | 2 +- tests/libtest/lib515.c | 2 +- tests/libtest/lib516.c | 2 +- tests/libtest/lib517.c | 2 +- tests/libtest/lib518.c | 4 ++-- tests/libtest/lib519.c | 2 +- tests/libtest/lib520.c | 2 +- tests/libtest/lib521.c | 2 +- tests/libtest/lib523.c | 2 +- tests/libtest/lib524.c | 2 +- tests/libtest/lib525.c | 2 +- tests/libtest/lib526.c | 2 +- tests/libtest/lib530.c | 4 ++-- tests/libtest/lib533.c | 2 +- tests/libtest/lib536.c | 2 +- tests/libtest/lib537.c | 4 ++-- tests/libtest/lib539.c | 2 +- tests/libtest/lib540.c | 2 +- tests/libtest/lib541.c | 2 +- tests/libtest/lib542.c | 2 +- tests/libtest/lib543.c | 2 +- tests/libtest/lib544.c | 2 +- tests/libtest/lib547.c | 2 +- tests/libtest/lib549.c | 2 +- tests/libtest/lib552.c | 2 +- tests/libtest/lib553.c | 2 +- tests/libtest/lib554.c | 4 ++-- tests/libtest/lib555.c | 2 +- tests/libtest/lib556.c | 2 +- tests/libtest/lib557.c | 2 +- tests/libtest/lib558.c | 2 +- tests/libtest/lib559.c | 2 +- tests/libtest/lib560.c | 2 +- tests/libtest/lib562.c | 2 +- tests/libtest/lib564.c | 2 +- tests/libtest/lib566.c | 2 +- tests/libtest/lib567.c | 2 +- tests/libtest/lib568.c | 2 +- tests/libtest/lib569.c | 2 +- tests/libtest/lib570.c | 2 +- tests/libtest/lib571.c | 2 +- tests/libtest/lib572.c | 2 +- tests/libtest/lib573.c | 2 +- tests/libtest/lib574.c | 2 +- tests/libtest/lib575.c | 2 +- tests/libtest/lib576.c | 2 +- tests/libtest/lib578.c | 2 +- tests/libtest/lib579.c | 2 +- tests/libtest/lib582.c | 2 +- tests/libtest/lib583.c | 2 +- tests/libtest/lib586.c | 8 +++----- tests/libtest/lib589.c | 2 +- tests/libtest/lib590.c | 2 +- tests/libtest/lib591.c | 2 +- tests/libtest/lib597.c | 2 +- tests/libtest/lib598.c | 2 +- tests/libtest/lib599.c | 2 +- tests/libtest/lib643.c | 4 ++-- tests/libtest/lib650.c | 2 +- tests/libtest/lib651.c | 2 +- tests/libtest/lib652.c | 2 +- tests/libtest/lib653.c | 2 +- tests/libtest/lib654.c | 2 +- tests/libtest/lib655.c | 2 +- tests/libtest/lib658.c | 2 +- tests/libtest/lib659.c | 2 +- tests/libtest/lib661.c | 2 +- tests/libtest/lib666.c | 2 +- tests/libtest/lib667.c | 2 +- tests/libtest/lib668.c | 2 +- tests/libtest/lib670.c | 2 +- tests/libtest/lib674.c | 2 +- tests/libtest/lib676.c | 2 +- tests/libtest/lib677.c | 2 +- tests/libtest/lib678.c | 2 +- tests/libtest/lib694.c | 2 +- tests/libtest/lib695.c | 2 +- tests/libtest/lib751.c | 2 +- tests/libtest/lib753.c | 4 ++-- tests/libtest/mk-lib1521.pl | 2 +- tests/tunit/tool1394.c | 2 +- tests/tunit/tool1604.c | 2 +- tests/tunit/tool1621.c | 2 +- tests/unit/README.md | 4 ++-- tests/unit/unit1300.c | 2 +- tests/unit/unit1302.c | 2 +- tests/unit/unit1303.c | 2 +- tests/unit/unit1304.c | 4 ++-- tests/unit/unit1305.c | 2 +- tests/unit/unit1307.c | 4 ++-- tests/unit/unit1309.c | 2 +- tests/unit/unit1323.c | 2 +- tests/unit/unit1330.c | 2 +- tests/unit/unit1395.c | 2 +- tests/unit/unit1396.c | 2 +- tests/unit/unit1397.c | 2 +- tests/unit/unit1398.c | 2 +- tests/unit/unit1399.c | 2 +- tests/unit/unit1600.c | 2 +- tests/unit/unit1601.c | 2 +- tests/unit/unit1602.c | 2 +- tests/unit/unit1603.c | 2 +- tests/unit/unit1605.c | 2 +- tests/unit/unit1606.c | 2 +- tests/unit/unit1607.c | 2 +- tests/unit/unit1608.c | 4 ++-- tests/unit/unit1609.c | 2 +- tests/unit/unit1610.c | 2 +- tests/unit/unit1611.c | 2 +- tests/unit/unit1612.c | 2 +- tests/unit/unit1614.c | 2 +- tests/unit/unit1615.c | 2 +- tests/unit/unit1616.c | 2 +- tests/unit/unit1620.c | 2 +- tests/unit/unit1650.c | 2 +- tests/unit/unit1651.c | 2 +- tests/unit/unit1652.c | 2 +- tests/unit/unit1653.c | 2 +- tests/unit/unit1654.c | 2 +- tests/unit/unit1655.c | 2 +- tests/unit/unit1656.c | 4 ++-- tests/unit/unit1657.c | 4 ++-- tests/unit/unit1658.c | 4 ++-- tests/unit/unit1660.c | 4 ++-- tests/unit/unit1661.c | 2 +- tests/unit/unit1663.c | 2 +- tests/unit/unit1664.c | 2 +- tests/unit/unit1979.c | 2 +- tests/unit/unit1980.c | 2 +- tests/unit/unit2600.c | 2 +- tests/unit/unit2601.c | 2 +- tests/unit/unit2602.c | 2 +- tests/unit/unit2603.c | 2 +- tests/unit/unit2604.c | 2 +- tests/unit/unit3200.c | 2 +- tests/unit/unit3205.c | 2 +- tests/unit/unit3211.c | 2 +- tests/unit/unit3212.c | 2 +- tests/unit/unit3213.c | 2 +- tests/unit/unit3214.c | 2 +- 292 files changed, 347 insertions(+), 346 deletions(-) diff --git a/lib/netrc.c b/lib/netrc.c index ab068b18e6..447ee09585 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -390,7 +390,7 @@ const char *Curl_netrc_strerror(NETRCcode ret) */ NETRCcode Curl_parsenetrc(struct store_netrc *store, const char *host, char **loginp, char **passwordp, - char *netrcfile) + const char *netrcfile) { NETRCcode retcode = NETRC_OK; char *filealloc = NULL; diff --git a/lib/netrc.h b/lib/netrc.h index ef3bde5212..0d6d081bfb 100644 --- a/lib/netrc.h +++ b/lib/netrc.h @@ -48,7 +48,8 @@ void Curl_netrc_init(struct store_netrc *s); void Curl_netrc_cleanup(struct store_netrc *s); NETRCcode Curl_parsenetrc(struct store_netrc *s, const char *host, - char **loginp, char **passwordp, char *filename); + char **loginp, char **passwordp, + const char *filename); /* Assume: (*passwordp)[0]=0, host[0] != 0. * If (*loginp)[0] = 0, search for login and password within a machine * section in the netrc. diff --git a/tests/libtest/first.c b/tests/libtest/first.c index 0ca736668b..acde2926c0 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -50,11 +50,11 @@ int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc, return select(nfds, rd, wr, exc, tv); } -char *libtest_arg2 = NULL; -char *libtest_arg3 = NULL; -char *libtest_arg4 = NULL; +const char *libtest_arg2 = NULL; +const char *libtest_arg3 = NULL; +const char *libtest_arg4 = NULL; int test_argc; -char **test_argv; +const char **test_argv; int testnum; struct curltime tv_test_start; /* for test timing */ @@ -98,12 +98,12 @@ char *hexdump(const unsigned char *buf, size_t len) } -int main(int argc, char **argv) +int main(int argc, const char **argv) { - char *URL; + const char *URL; CURLcode result; entry_func_t entry_func; - char *entry_name; + const char *entry_name; char *env; size_t tmp; diff --git a/tests/libtest/first.h b/tests/libtest/first.h index a909290024..82b2e6aa64 100644 --- a/tests/libtest/first.h +++ b/tests/libtest/first.h @@ -34,7 +34,7 @@ #include -typedef CURLcode (*entry_func_t)(char *); +typedef CURLcode (*entry_func_t)(const char *); struct entry_s { const char *name; @@ -69,13 +69,13 @@ extern int unitfail; /* for unittests */ if((res = curl_multi_setopt((A), (B), (C))) != CURLE_OK) \ goto test_cleanup -extern char *libtest_arg2; /* set by first.c to the argv[2] or NULL */ -extern char *libtest_arg3; /* set by first.c to the argv[3] or NULL */ -extern char *libtest_arg4; /* set by first.c to the argv[4] or NULL */ +extern const char *libtest_arg2; /* set by first.c to the argv[2] or NULL */ +extern const char *libtest_arg3; /* set by first.c to the argv[3] or NULL */ +extern const char *libtest_arg4; /* set by first.c to the argv[4] or NULL */ /* argc and argv as passed in to the main() function */ extern int test_argc; -extern char **test_argv; +extern const char **test_argv; extern int testnum; extern struct curltime tv_test_start; /* for test timing */ diff --git a/tests/libtest/lib1156.c b/tests/libtest/lib1156.c index a3e0815372..a04b884ca5 100644 --- a/tests/libtest/lib1156.c +++ b/tests/libtest/lib1156.c @@ -131,7 +131,7 @@ test_cleanup: /* for debugging: */ /* #define SINGLETEST 9 */ -static CURLcode test_lib1156(char *URL) +static CURLcode test_lib1156(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib1301.c b/tests/libtest/lib1301.c index 0691d6c31f..d476aed148 100644 --- a/tests/libtest/lib1301.c +++ b/tests/libtest/lib1301.c @@ -32,7 +32,7 @@ } \ } while(0) -static CURLcode test_lib1301(char *URL) +static CURLcode test_lib1301(const char *URL) { int rc; (void)URL; diff --git a/tests/libtest/lib1308.c b/tests/libtest/lib1308.c index 0db7fa84a3..8e83462a7a 100644 --- a/tests/libtest/lib1308.c +++ b/tests/libtest/lib1308.c @@ -39,7 +39,7 @@ static size_t print_httppost_callback(void *arg, const char *buf, size_t len) } \ } while(0) -static CURLcode test_lib1308(char *URL) +static CURLcode test_lib1308(const char *URL) { int errorcount = 0; CURLFORMcode rc; diff --git a/tests/libtest/lib1485.c b/tests/libtest/lib1485.c index 50c851c640..0ca017e3e7 100644 --- a/tests/libtest/lib1485.c +++ b/tests/libtest/lib1485.c @@ -85,7 +85,7 @@ static size_t t1485_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) return len; } -static CURLcode test_lib1485(char *URL) +static CURLcode test_lib1485(const char *URL) { CURL *curls = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1500.c b/tests/libtest/lib1500.c index 418db89503..8529f66a44 100644 --- a/tests/libtest/lib1500.c +++ b/tests/libtest/lib1500.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1500(char *URL) +static CURLcode test_lib1500(const char *URL) { CURL *curls = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib1501.c b/tests/libtest/lib1501.c index 79f8353a61..61e586cd3d 100644 --- a/tests/libtest/lib1501.c +++ b/tests/libtest/lib1501.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1501(char *URL) +static CURLcode test_lib1501(const char *URL) { static const long HANG_TIMEOUT = 30 * 1000; /* 500 milliseconds allowed. An extreme number but lets be really diff --git a/tests/libtest/lib1502.c b/tests/libtest/lib1502.c index 39a7387430..22ac6e7c80 100644 --- a/tests/libtest/lib1502.c +++ b/tests/libtest/lib1502.c @@ -33,7 +33,7 @@ #include "memdebug.h" -static CURLcode test_lib1502(char *URL) +static CURLcode test_lib1502(const char *URL) { CURL *easy = NULL; CURL *dup; diff --git a/tests/libtest/lib1506.c b/tests/libtest/lib1506.c index 764ca3fced..0ae7ae928c 100644 --- a/tests/libtest/lib1506.c +++ b/tests/libtest/lib1506.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1506(char *URL) +static CURLcode test_lib1506(const char *URL) { CURLcode res = CURLE_OK; CURL *curl[NUM_HANDLES] = {0}; @@ -35,8 +35,8 @@ static CURLcode test_lib1506(char *URL) char target_url[256]; char dnsentry[256]; struct curl_slist *slist = NULL, *slist2; - char *port = libtest_arg3; - char *address = libtest_arg2; + const char *port = libtest_arg3; + const char *address = libtest_arg2; (void)URL; diff --git a/tests/libtest/lib1507.c b/tests/libtest/lib1507.c index 4588f2af48..d6671e3c15 100644 --- a/tests/libtest/lib1507.c +++ b/tests/libtest/lib1507.c @@ -42,7 +42,7 @@ static size_t t1507_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return CURL_READFUNC_ABORT; } -static CURLcode test_lib1507(char *URL) +static CURLcode test_lib1507(const char *URL) { static const int MULTI_PERFORM_HANG_TIMEOUT = 60 * 1000; diff --git a/tests/libtest/lib1508.c b/tests/libtest/lib1508.c index d07bb28d8e..a305e652ff 100644 --- a/tests/libtest/lib1508.c +++ b/tests/libtest/lib1508.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1508(char *URL) +static CURLcode test_lib1508(const char *URL) { CURLcode res = CURLE_OK; CURLM *m = NULL; diff --git a/tests/libtest/lib1509.c b/tests/libtest/lib1509.c index 1cc76845cb..a0d820903a 100644 --- a/tests/libtest/lib1509.c +++ b/tests/libtest/lib1509.c @@ -30,7 +30,7 @@ size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream); static unsigned long realHeaderSize = 0; -static CURLcode test_lib1509(char *URL) +static CURLcode test_lib1509(const char *URL) { long headerSize; CURLcode code; diff --git a/tests/libtest/lib1510.c b/tests/libtest/lib1510.c index 13ee0b724e..e914d48eb7 100644 --- a/tests/libtest/lib1510.c +++ b/tests/libtest/lib1510.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1510(char *URL) +static CURLcode test_lib1510(const char *URL) { static const int NUM_URLS = 4; @@ -35,8 +35,8 @@ static CURLcode test_lib1510(char *URL) char target_url[256]; char dnsentry[256]; struct curl_slist *slist = NULL, *slist2; - char *port = libtest_arg3; - char *address = libtest_arg2; + const char *port = libtest_arg3; + const char *address = libtest_arg2; (void)URL; diff --git a/tests/libtest/lib1511.c b/tests/libtest/lib1511.c index 5062cae32a..de09d2a6fa 100644 --- a/tests/libtest/lib1511.c +++ b/tests/libtest/lib1511.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1511(char *URL) +static CURLcode test_lib1511(const char *URL) { long unmet; CURL *curl = NULL; diff --git a/tests/libtest/lib1512.c b/tests/libtest/lib1512.c index 2841be63fb..589d903d75 100644 --- a/tests/libtest/lib1512.c +++ b/tests/libtest/lib1512.c @@ -32,12 +32,12 @@ #include "memdebug.h" -static CURLcode test_lib1512(char *URL) +static CURLcode test_lib1512(const char *URL) { CURLcode res = CURLE_OK; CURL *curl[2] = {NULL, NULL}; - char *port = libtest_arg3; - char *address = libtest_arg2; + const char *port = libtest_arg3; + const char *address = libtest_arg2; char dnsentry[256]; struct curl_slist *slist = NULL; size_t i; diff --git a/tests/libtest/lib1513.c b/tests/libtest/lib1513.c index 0584dd9991..c86c5185e2 100644 --- a/tests/libtest/lib1513.c +++ b/tests/libtest/lib1513.c @@ -47,7 +47,7 @@ static int progressKiller(void *arg, return 1; } -static CURLcode test_lib1513(char *URL) +static CURLcode test_lib1513(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1514.c b/tests/libtest/lib1514.c index 33c4f2ab03..265f47af08 100644 --- a/tests/libtest/lib1514.c +++ b/tests/libtest/lib1514.c @@ -52,7 +52,7 @@ static size_t t1514_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib1514(char *URL) +static CURLcode test_lib1514(const char *URL) { CURL *curl; CURLcode result = CURLE_OK; diff --git a/tests/libtest/lib1515.c b/tests/libtest/lib1515.c index 473c2e36bd..64140977b5 100644 --- a/tests/libtest/lib1515.c +++ b/tests/libtest/lib1515.c @@ -35,7 +35,7 @@ #define DNS_TIMEOUT 1L -static CURLcode do_one_request(CURLM *m, char *URL, char *resolve) +static CURLcode do_one_request(CURLM *m, const char *URL, const char *resolve) { CURL *curls; struct curl_slist *resolve_list = NULL; @@ -100,13 +100,13 @@ test_cleanup: return res; } -static CURLcode test_lib1515(char *URL) +static CURLcode test_lib1515(const char *URL) { CURLM *multi = NULL; CURLcode res = CURLE_OK; - char *address = libtest_arg2; - char *port = libtest_arg3; - char *path = URL; + const char *path = URL; + const char *address = libtest_arg2; + const char *port = libtest_arg3; char dns_entry[256]; int i; int count = 2; diff --git a/tests/libtest/lib1517.c b/tests/libtest/lib1517.c index bb1d3f248a..c542aad032 100644 --- a/tests/libtest/lib1517.c +++ b/tests/libtest/lib1517.c @@ -51,7 +51,7 @@ static size_t t1517_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return tocopy; } -static CURLcode test_lib1517(char *URL) +static CURLcode test_lib1517(const char *URL) { static const char testdata[] = "this is what we post to the silly web server\n"; diff --git a/tests/libtest/lib1518.c b/tests/libtest/lib1518.c index 3d93cf5edd..63e861910d 100644 --- a/tests/libtest/lib1518.c +++ b/tests/libtest/lib1518.c @@ -37,7 +37,7 @@ static size_t t1518_write_cb(char *buffer, size_t size, size_t nitems, return 0; } -static CURLcode test_lib1518(char *URL) +static CURLcode test_lib1518(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1520.c b/tests/libtest/lib1520.c index 76e5d5f0ec..9d6b3b611d 100644 --- a/tests/libtest/lib1520.c +++ b/tests/libtest/lib1520.c @@ -71,7 +71,7 @@ static size_t t1520_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; } -static CURLcode test_lib1520(char *URL) +static CURLcode test_lib1520(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib1522.c b/tests/libtest/lib1522.c index 1057ef7e3d..569c46c527 100644 --- a/tests/libtest/lib1522.c +++ b/tests/libtest/lib1522.c @@ -45,7 +45,7 @@ static int sockopt_callback(void *clientp, curl_socket_t curlfd, return CURL_SOCKOPT_OK; } -static CURLcode test_lib1522(char *URL) +static CURLcode test_lib1522(const char *URL) { static char g_Data[40 * 1024]; /* POST 40KB */ diff --git a/tests/libtest/lib1523.c b/tests/libtest/lib1523.c index 13f3755326..77767b20be 100644 --- a/tests/libtest/lib1523.c +++ b/tests/libtest/lib1523.c @@ -53,7 +53,7 @@ static CURLcode run(CURL *hnd, long limit, long time) return curl_easy_perform(hnd); } -static CURLcode test_lib1523(char *URL) +static CURLcode test_lib1523(const char *URL) { CURLcode ret; CURL *hnd; diff --git a/tests/libtest/lib1525.c b/tests/libtest/lib1525.c index 375d6aef51..7e7d98ef79 100644 --- a/tests/libtest/lib1525.c +++ b/tests/libtest/lib1525.c @@ -45,7 +45,7 @@ static size_t t1525_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) return strlen(t1525_testdata); } -static CURLcode test_lib1525(char *URL) +static CURLcode test_lib1525(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1526.c b/tests/libtest/lib1526.c index c2e3685a15..bf2a07ee9d 100644 --- a/tests/libtest/lib1526.c +++ b/tests/libtest/lib1526.c @@ -44,7 +44,7 @@ static size_t t1526_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) return strlen(t1526_testdata); } -static CURLcode test_lib1526(char *URL) +static CURLcode test_lib1526(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1527.c b/tests/libtest/lib1527.c index 35e06b45ae..3624728687 100644 --- a/tests/libtest/lib1527.c +++ b/tests/libtest/lib1527.c @@ -44,7 +44,7 @@ static size_t t1527_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) return strlen(t1527_testdata); } -static CURLcode test_lib1527(char *URL) +static CURLcode test_lib1527(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1528.c b/tests/libtest/lib1528.c index 24293a0188..98bd2bdaf1 100644 --- a/tests/libtest/lib1528.c +++ b/tests/libtest/lib1528.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1528(char *URL) +static CURLcode test_lib1528(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1529.c b/tests/libtest/lib1529.c index 290343bc96..ae86b61a5e 100644 --- a/tests/libtest/lib1529.c +++ b/tests/libtest/lib1529.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1529(char *URL) +static CURLcode test_lib1529(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1530.c b/tests/libtest/lib1530.c index aa0529b3dd..19b0d9cbde 100644 --- a/tests/libtest/lib1530.c +++ b/tests/libtest/lib1530.c @@ -36,7 +36,7 @@ static curl_socket_t opensocket(void *clientp, return CURL_SOCKET_BAD; } -static CURLcode test_lib1530(char *URL) +static CURLcode test_lib1530(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1531.c b/tests/libtest/lib1531.c index 38626222d9..9d4cd77539 100644 --- a/tests/libtest/lib1531.c +++ b/tests/libtest/lib1531.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1531(char *URL) +static CURLcode test_lib1531(const char *URL) { static char const testData[] = ".abc\0xyz"; static curl_off_t const testDataSize = sizeof(testData) - 1; diff --git a/tests/libtest/lib1532.c b/tests/libtest/lib1532.c index 94e29cb29c..83a826de32 100644 --- a/tests/libtest/lib1532.c +++ b/tests/libtest/lib1532.c @@ -27,7 +27,7 @@ /* Test CURLINFO_RESPONSE_CODE */ -static CURLcode test_lib1532(char *URL) +static CURLcode test_lib1532(const char *URL) { CURL *curl; long httpcode; diff --git a/tests/libtest/lib1533.c b/tests/libtest/lib1533.c index f74f612f72..15256deaf0 100644 --- a/tests/libtest/lib1533.c +++ b/tests/libtest/lib1533.c @@ -123,7 +123,7 @@ static CURLcode perform_and_check_connections(CURL *curl, } -static CURLcode test_lib1533(char *URL) +static CURLcode test_lib1533(const char *URL) { struct cb_data data; CURL *curl = NULL; diff --git a/tests/libtest/lib1534.c b/tests/libtest/lib1534.c index d99b135a24..af1c0bd520 100644 --- a/tests/libtest/lib1534.c +++ b/tests/libtest/lib1534.c @@ -27,7 +27,7 @@ /* Test CURLINFO_FILETIME */ -static CURLcode test_lib1534(char *URL) +static CURLcode test_lib1534(const char *URL) { CURL *curl, *dupe = NULL; long filetime; diff --git a/tests/libtest/lib1535.c b/tests/libtest/lib1535.c index 602f71717f..07a97dde0b 100644 --- a/tests/libtest/lib1535.c +++ b/tests/libtest/lib1535.c @@ -27,7 +27,7 @@ /* Test CURLINFO_PROTOCOL */ -static CURLcode test_lib1535(char *URL) +static CURLcode test_lib1535(const char *URL) { CURL *curl, *dupe = NULL; long protocol; diff --git a/tests/libtest/lib1536.c b/tests/libtest/lib1536.c index dd0a2bf7d5..3219724b9a 100644 --- a/tests/libtest/lib1536.c +++ b/tests/libtest/lib1536.c @@ -27,7 +27,7 @@ /* Test CURLINFO_SCHEME */ -static CURLcode test_lib1536(char *URL) +static CURLcode test_lib1536(const char *URL) { CURL *curl, *dupe = NULL; char *scheme; diff --git a/tests/libtest/lib1537.c b/tests/libtest/lib1537.c index 56f018395c..52272cb2ec 100644 --- a/tests/libtest/lib1537.c +++ b/tests/libtest/lib1537.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1537(char *URL) +static CURLcode test_lib1537(const char *URL) { const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7}; diff --git a/tests/libtest/lib1538.c b/tests/libtest/lib1538.c index fc816d358d..396ca79010 100644 --- a/tests/libtest/lib1538.c +++ b/tests/libtest/lib1538.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1538(char *URL) +static CURLcode test_lib1538(const char *URL) { CURLcode res = CURLE_OK; CURLcode easyret; diff --git a/tests/libtest/lib1540.c b/tests/libtest/lib1540.c index b53a3e847d..e54fdd515b 100644 --- a/tests/libtest/lib1540.c +++ b/tests/libtest/lib1540.c @@ -81,7 +81,7 @@ static size_t t1540_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) return CURL_WRITEFUNC_PAUSE; } -static CURLcode test_lib1540(char *URL) +static CURLcode test_lib1540(const char *URL) { CURL *curls = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1541.c b/tests/libtest/lib1541.c index 314be84792..ccbb5e8f43 100644 --- a/tests/libtest/lib1541.c +++ b/tests/libtest/lib1541.c @@ -108,7 +108,7 @@ static size_t t1541_write_cb(char *ptr, size_t size, size_t nmemb, void *userp) return size * nmemb; } -static CURLcode test_lib1541(char *URL) +static CURLcode test_lib1541(const char *URL) { CURL *curls = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1542.c b/tests/libtest/lib1542.c index f78999e236..1f7dbed0a8 100644 --- a/tests/libtest/lib1542.c +++ b/tests/libtest/lib1542.c @@ -35,7 +35,7 @@ #include "testtrace.h" #include "memdebug.h" -static CURLcode test_lib1542(char *URL) +static CURLcode test_lib1542(const char *URL) { CURL *easy = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1545.c b/tests/libtest/lib1545.c index e29c872f5f..ac59d028c0 100644 --- a/tests/libtest/lib1545.c +++ b/tests/libtest/lib1545.c @@ -23,7 +23,7 @@ ***************************************************************************/ #include "first.h" -static CURLcode test_lib1545(char *URL) +static CURLcode test_lib1545(const char *URL) { CURL *eh = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1550.c b/tests/libtest/lib1550.c index 29e8407d3b..6fedbf6884 100644 --- a/tests/libtest/lib1550.c +++ b/tests/libtest/lib1550.c @@ -27,7 +27,7 @@ #include -static CURLcode test_lib1550(char *URL) +static CURLcode test_lib1550(const char *URL) { CURLM *handle; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1551.c b/tests/libtest/lib1551.c index e6162eff6f..80020f5556 100644 --- a/tests/libtest/lib1551.c +++ b/tests/libtest/lib1551.c @@ -27,7 +27,7 @@ #include -static CURLcode test_lib1551(char *URL) +static CURLcode test_lib1551(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1552.c b/tests/libtest/lib1552.c index 7d55e2873f..a5b23fbd8b 100644 --- a/tests/libtest/lib1552.c +++ b/tests/libtest/lib1552.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1552(char *URL) +static CURLcode test_lib1552(const char *URL) { CURL *curls = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib1553.c b/tests/libtest/lib1553.c index 5a31f48a09..8be90d7d3c 100644 --- a/tests/libtest/lib1553.c +++ b/tests/libtest/lib1553.c @@ -39,7 +39,7 @@ static int t1553_xferinfo(void *p, return 1; /* fail as fast as we can */ } -static CURLcode test_lib1553(char *URL) +static CURLcode test_lib1553(const char *URL) { CURL *curls = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib1554.c b/tests/libtest/lib1554.c index 51084a2c20..240fea6577 100644 --- a/tests/libtest/lib1554.c +++ b/tests/libtest/lib1554.c @@ -56,7 +56,7 @@ static void t1554_test_unlock(CURL *handle, curl_lock_data data, void *useptr) } /* test function */ -static CURLcode test_lib1554(char *URL) +static CURLcode test_lib1554(const char *URL) { CURLcode res = CURLE_OK; CURLSH *share = NULL; diff --git a/tests/libtest/lib1555.c b/tests/libtest/lib1555.c index 51692fab67..4ebde5c74c 100644 --- a/tests/libtest/lib1555.c +++ b/tests/libtest/lib1555.c @@ -53,7 +53,7 @@ static int progressCallback(void *arg, return 1; } -static CURLcode test_lib1555(char *URL) +static CURLcode test_lib1555(const char *URL) { CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1556.c b/tests/libtest/lib1556.c index 2bdb003615..20b86b4e98 100644 --- a/tests/libtest/lib1556.c +++ b/tests/libtest/lib1556.c @@ -42,7 +42,7 @@ static size_t header(char *ptr, size_t size, size_t nmemb, void *stream) return nmemb * size; } -static CURLcode test_lib1556(char *URL) +static CURLcode test_lib1556(const char *URL) { CURLcode code; CURL *curl = NULL; diff --git a/tests/libtest/lib1557.c b/tests/libtest/lib1557.c index 4aeba40853..2381c07b6a 100644 --- a/tests/libtest/lib1557.c +++ b/tests/libtest/lib1557.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1557(char *URL) +static CURLcode test_lib1557(const char *URL) { CURLM *curlm = NULL; CURL *curl1 = NULL; diff --git a/tests/libtest/lib1558.c b/tests/libtest/lib1558.c index a91e14ad07..1bbc0f77b7 100644 --- a/tests/libtest/lib1558.c +++ b/tests/libtest/lib1558.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1558(char *URL) +static CURLcode test_lib1558(const char *URL) { CURLcode res = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib1559.c b/tests/libtest/lib1559.c index f1ce42e35c..2337e7b62d 100644 --- a/tests/libtest/lib1559.c +++ b/tests/libtest/lib1559.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1559(char *URL) +static CURLcode test_lib1559(const char *URL) { static const int EXCESSIVE = 10*1000*1000; diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c index 88c54097e1..2171034d3c 100644 --- a/tests/libtest/lib1560.c +++ b/tests/libtest/lib1560.c @@ -2028,7 +2028,7 @@ err: return 1; } -static CURLcode test_lib1560(char *URL) +static CURLcode test_lib1560(const char *URL) { bool has_utf8 = !!getenv("CURL_TEST_HAVE_CODESET_UTF8"); diff --git a/tests/libtest/lib1564.c b/tests/libtest/lib1564.c index fec8581e92..283f9dcf39 100644 --- a/tests/libtest/lib1564.c +++ b/tests/libtest/lib1564.c @@ -27,7 +27,7 @@ #define WAKEUP_NUM 10 -static CURLcode test_lib1564(char *URL) +static CURLcode test_lib1564(const char *URL) { CURLM *multi = NULL; int numfds; diff --git a/tests/libtest/lib1565.c b/tests/libtest/lib1565.c index 620cbbe592..4d38da06f2 100644 --- a/tests/libtest/lib1565.c +++ b/tests/libtest/lib1565.c @@ -85,7 +85,7 @@ test_cleanup: return NULL; } -static CURLcode test_lib1565(char *URL) +static CURLcode test_lib1565(const char *URL) { int still_running; int num; @@ -199,7 +199,7 @@ test_cleanup: } #else /* without pthread, this test doesn't work */ -static CURLcode test_lib1565(char *URL) +static CURLcode test_lib1565(const char *URL) { (void)URL; return CURLE_OK; diff --git a/tests/libtest/lib1567.c b/tests/libtest/lib1567.c index bdac6c6afa..e001615725 100644 --- a/tests/libtest/lib1567.c +++ b/tests/libtest/lib1567.c @@ -27,7 +27,7 @@ #include -static CURLcode test_lib1567(char *URL) +static CURLcode test_lib1567(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1568.c b/tests/libtest/lib1568.c index eb8d31e926..a2451486fd 100644 --- a/tests/libtest/lib1568.c +++ b/tests/libtest/lib1568.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1568(char *URL) +static CURLcode test_lib1568(const char *URL) { CURLcode ret; CURL *hnd; diff --git a/tests/libtest/lib1569.c b/tests/libtest/lib1569.c index a29ed65f68..2846909e88 100644 --- a/tests/libtest/lib1569.c +++ b/tests/libtest/lib1569.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1569(char *URL) +static CURLcode test_lib1569(const char *URL) { CURLcode res = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib1571.c b/tests/libtest/lib1571.c index e18b5c3f21..a4923e9196 100644 --- a/tests/libtest/lib1571.c +++ b/tests/libtest/lib1571.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1571(char *URL) +static CURLcode test_lib1571(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib1576.c b/tests/libtest/lib1576.c index c9b1c9d7ce..203ef2b989 100644 --- a/tests/libtest/lib1576.c +++ b/tests/libtest/lib1576.c @@ -47,7 +47,7 @@ static int t1576_seek_callback(void *ptr, curl_off_t offset, int origin) return CURL_SEEKFUNC_OK; } -static CURLcode test_lib1576(char *URL) +static CURLcode test_lib1576(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib1591.c b/tests/libtest/lib1591.c index 13590c1e94..3031ba1bb7 100644 --- a/tests/libtest/lib1591.c +++ b/tests/libtest/lib1591.c @@ -74,7 +74,7 @@ static int t1591_trailers_callback(struct curl_slist **list, void *userdata) } } -static CURLcode test_lib1591(char *URL) +static CURLcode test_lib1591(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_FAILED_INIT; diff --git a/tests/libtest/lib1592.c b/tests/libtest/lib1592.c index a64dfb84c2..3f76a19c4f 100644 --- a/tests/libtest/lib1592.c +++ b/tests/libtest/lib1592.c @@ -38,7 +38,7 @@ #include "first.h" -static CURLcode test_lib1592(char *URL) +static CURLcode test_lib1592(const char *URL) { int stillRunning; CURLM *multiHandle = NULL; diff --git a/tests/libtest/lib1593.c b/tests/libtest/lib1593.c index 44d8bf1e1d..22a07e2920 100644 --- a/tests/libtest/lib1593.c +++ b/tests/libtest/lib1593.c @@ -28,7 +28,7 @@ #include "memdebug.h" -static CURLcode test_lib1593(char *URL) +static CURLcode test_lib1593(const char *URL) { struct curl_slist *header = NULL; long unmet; diff --git a/tests/libtest/lib1594.c b/tests/libtest/lib1594.c index 283cea1b89..5c8db3ae92 100644 --- a/tests/libtest/lib1594.c +++ b/tests/libtest/lib1594.c @@ -28,7 +28,7 @@ #include "memdebug.h" -static CURLcode test_lib1594(char *URL) +static CURLcode test_lib1594(const char *URL) { struct curl_slist *header = NULL; curl_off_t retry; diff --git a/tests/libtest/lib1597.c b/tests/libtest/lib1597.c index ab669c35b1..251016641e 100644 --- a/tests/libtest/lib1597.c +++ b/tests/libtest/lib1597.c @@ -33,7 +33,7 @@ struct pair { CURLcode *exp; }; -static CURLcode test_lib1597(char *URL) +static CURLcode test_lib1597(const char *URL) { CURL *curl = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1598.c b/tests/libtest/lib1598.c index 72b18d4c53..4120916ff0 100644 --- a/tests/libtest/lib1598.c +++ b/tests/libtest/lib1598.c @@ -52,7 +52,7 @@ static int t1598_trailers_callback(struct curl_slist **list, void *userdata) } } -static CURLcode test_lib1598(char *URL) +static CURLcode test_lib1598(const char *URL) { static const char *post_data = "xxx=yyy&aaa=bbbbb"; diff --git a/tests/libtest/lib1599.c b/tests/libtest/lib1599.c index 73ca9e18f6..5bbdad81b2 100644 --- a/tests/libtest/lib1599.c +++ b/tests/libtest/lib1599.c @@ -23,7 +23,7 @@ ***************************************************************************/ #include "first.h" -static CURLcode test_lib1599(char *URL) +static CURLcode test_lib1599(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1662.c b/tests/libtest/lib1662.c index 5ac7e1246d..b0ca4c5094 100644 --- a/tests/libtest/lib1662.c +++ b/tests/libtest/lib1662.c @@ -46,7 +46,7 @@ static size_t t1662_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib1662(char *URL) +static CURLcode test_lib1662(const char *URL) { CURLcode res = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c index a3932de5b8..3e9c60f4a8 100644 --- a/tests/libtest/lib1900.c +++ b/tests/libtest/lib1900.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1900(char *URL) +static CURLcode test_lib1900(const char *URL) { CURLcode res = CURLE_OK; CURL *hnd = NULL; diff --git a/tests/libtest/lib1901.c b/tests/libtest/lib1901.c index d326a2172e..cb66001f9b 100644 --- a/tests/libtest/lib1901.c +++ b/tests/libtest/lib1901.c @@ -47,7 +47,7 @@ static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream) return 0; } -static CURLcode test_lib1901(char *URL) +static CURLcode test_lib1901(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1903.c b/tests/libtest/lib1903.c index 3c99a99a47..af21e946b9 100644 --- a/tests/libtest/lib1903.c +++ b/tests/libtest/lib1903.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1903(char *URL) +static CURLcode test_lib1903(const char *URL) { CURLcode res = CURLE_OK; CURL *ch = NULL; diff --git a/tests/libtest/lib1905.c b/tests/libtest/lib1905.c index abc7a52c71..a227a09beb 100644 --- a/tests/libtest/lib1905.c +++ b/tests/libtest/lib1905.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1905(char *URL) +static CURLcode test_lib1905(const char *URL) { CURLSH *sh = NULL; CURL *ch = NULL; diff --git a/tests/libtest/lib1906.c b/tests/libtest/lib1906.c index 010434be1c..72486d6227 100644 --- a/tests/libtest/lib1906.c +++ b/tests/libtest/lib1906.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1906(char *URL) +static CURLcode test_lib1906(const char *URL) { CURLcode res = CURLE_OK; char *url_after = NULL; diff --git a/tests/libtest/lib1907.c b/tests/libtest/lib1907.c index 98d7f68c53..11088e2edf 100644 --- a/tests/libtest/lib1907.c +++ b/tests/libtest/lib1907.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1907(char *URL) +static CURLcode test_lib1907(const char *URL) { char *url_after; CURL *curl; diff --git a/tests/libtest/lib1908.c b/tests/libtest/lib1908.c index 57982b9bd6..98e01fac9a 100644 --- a/tests/libtest/lib1908.c +++ b/tests/libtest/lib1908.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1908(char *URL) +static CURLcode test_lib1908(const char *URL) { CURLcode ret = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib1910.c b/tests/libtest/lib1910.c index da83f66491..6164d59545 100644 --- a/tests/libtest/lib1910.c +++ b/tests/libtest/lib1910.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1910(char *URL) +static CURLcode test_lib1910(const char *URL) { CURLcode ret = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib1911.c b/tests/libtest/lib1911.c index b9d8c30f1e..149986f656 100644 --- a/tests/libtest/lib1911.c +++ b/tests/libtest/lib1911.c @@ -29,7 +29,7 @@ define not publicly exposed so we set our own */ #define MAX_INPUT_LENGTH 8000000 -static CURLcode test_lib1911(char *URL) +static CURLcode test_lib1911(const char *URL) { static char testbuf[MAX_INPUT_LENGTH + 2]; diff --git a/tests/libtest/lib1912.c b/tests/libtest/lib1912.c index e74808c3c0..dd3e638816 100644 --- a/tests/libtest/lib1912.c +++ b/tests/libtest/lib1912.c @@ -29,7 +29,7 @@ curl_mfprintf(stderr, "Type mismatch for CURLOPT_%s (expected %s)\n", \ name, exp) -static CURLcode test_lib1912(char *URL) +static CURLcode test_lib1912(const char *URL) { /* Only test if GCC typechecking is available */ int error = 0; diff --git a/tests/libtest/lib1913.c b/tests/libtest/lib1913.c index b33a5face8..e0519aef29 100644 --- a/tests/libtest/lib1913.c +++ b/tests/libtest/lib1913.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1913(char *URL) +static CURLcode test_lib1913(const char *URL) { CURLcode ret = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib1915.c b/tests/libtest/lib1915.c index 3c4d4bb34d..95928df964 100644 --- a/tests/libtest/lib1915.c +++ b/tests/libtest/lib1915.c @@ -95,7 +95,7 @@ static CURLSTScode hstswrite(CURL *easy, struct curl_hstsentry *e, * Read/write HSTS cache entries via callback. */ -static CURLcode test_lib1915(char *URL) +static CURLcode test_lib1915(const char *URL) { CURLcode res = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib1916.c b/tests/libtest/lib1916.c index 9dcbd45c0c..24583ab8a1 100644 --- a/tests/libtest/lib1916.c +++ b/tests/libtest/lib1916.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1916(char *URL) +static CURLcode test_lib1916(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1918.c b/tests/libtest/lib1918.c index 1f40962cd5..86fa84c92f 100644 --- a/tests/libtest/lib1918.c +++ b/tests/libtest/lib1918.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1918(char *URL) +static CURLcode test_lib1918(const char *URL) { const struct curl_easyoption *o; (void)URL; diff --git a/tests/libtest/lib1919.c b/tests/libtest/lib1919.c index e86e6d53c4..a619850dc7 100644 --- a/tests/libtest/lib1919.c +++ b/tests/libtest/lib1919.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1919(char *URL) +static CURLcode test_lib1919(const char *URL) { CURLcode res = CURLE_OK; CURL *curl; diff --git a/tests/libtest/lib1933.c b/tests/libtest/lib1933.c index 67b93a170d..bdd914a641 100644 --- a/tests/libtest/lib1933.c +++ b/tests/libtest/lib1933.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1933(char *URL) +static CURLcode test_lib1933(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1934.c b/tests/libtest/lib1934.c index 097ccecfd6..2cffaa9bc7 100644 --- a/tests/libtest/lib1934.c +++ b/tests/libtest/lib1934.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1934(char *URL) +static CURLcode test_lib1934(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1935.c b/tests/libtest/lib1935.c index 4be038f708..4f6a1ebb73 100644 --- a/tests/libtest/lib1935.c +++ b/tests/libtest/lib1935.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1935(char *URL) +static CURLcode test_lib1935(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1936.c b/tests/libtest/lib1936.c index 9992507d94..438cf92c58 100644 --- a/tests/libtest/lib1936.c +++ b/tests/libtest/lib1936.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1936(char *URL) +static CURLcode test_lib1936(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1937.c b/tests/libtest/lib1937.c index be69974039..4903f7409a 100644 --- a/tests/libtest/lib1937.c +++ b/tests/libtest/lib1937.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1937(char *URL) +static CURLcode test_lib1937(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1938.c b/tests/libtest/lib1938.c index 90707c8553..c0bfb6b8ce 100644 --- a/tests/libtest/lib1938.c +++ b/tests/libtest/lib1938.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1938(char *URL) +static CURLcode test_lib1938(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1939.c b/tests/libtest/lib1939.c index a909bb7333..61199900df 100644 --- a/tests/libtest/lib1939.c +++ b/tests/libtest/lib1939.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1939(char *URL) +static CURLcode test_lib1939(const char *URL) { CURLM *multi; CURL *easy; diff --git a/tests/libtest/lib1940.c b/tests/libtest/lib1940.c index cfd5ab6b61..c78564dd1a 100644 --- a/tests/libtest/lib1940.c +++ b/tests/libtest/lib1940.c @@ -77,7 +77,7 @@ static void t1940_showem(CURL *easy, int header_request, unsigned int type) } } -static CURLcode test_lib1940(char *URL) +static CURLcode test_lib1940(const char *URL) { CURL *easy = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1945.c b/tests/libtest/lib1945.c index 334047ca3e..ec280e6da9 100644 --- a/tests/libtest/lib1945.c +++ b/tests/libtest/lib1945.c @@ -46,7 +46,7 @@ static size_t t1945_write_cb(char *data, size_t n, size_t l, void *userp) return n*l; } -static CURLcode test_lib1945(char *URL) +static CURLcode test_lib1945(const char *URL) { CURL *easy; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1947.c b/tests/libtest/lib1947.c index a6c0555506..19fbcb7af4 100644 --- a/tests/libtest/lib1947.c +++ b/tests/libtest/lib1947.c @@ -33,7 +33,7 @@ static size_t t1947_write_cb(char *data, size_t n, size_t l, void *userp) return n*l; } -static CURLcode test_lib1947(char *URL) +static CURLcode test_lib1947(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1948.c b/tests/libtest/lib1948.c index 0567999762..98fa91e8d5 100644 --- a/tests/libtest/lib1948.c +++ b/tests/libtest/lib1948.c @@ -40,7 +40,7 @@ static size_t put_callback(char *ptr, size_t size, size_t nmemb, void *stream) return tocopy; } -static CURLcode test_lib1948(char *URL) +static CURLcode test_lib1948(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1955.c b/tests/libtest/lib1955.c index 0206b81ad7..e47a52275e 100644 --- a/tests/libtest/lib1955.c +++ b/tests/libtest/lib1955.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1955(char *URL) +static CURLcode test_lib1955(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1956.c b/tests/libtest/lib1956.c index d2ffdd912e..0f1c72e3d2 100644 --- a/tests/libtest/lib1956.c +++ b/tests/libtest/lib1956.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1956(char *URL) +static CURLcode test_lib1956(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1957.c b/tests/libtest/lib1957.c index 99ff21a6b0..8eeed09b7c 100644 --- a/tests/libtest/lib1957.c +++ b/tests/libtest/lib1957.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1957(char *URL) +static CURLcode test_lib1957(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1958.c b/tests/libtest/lib1958.c index 811ff2c0e6..7a94c76709 100644 --- a/tests/libtest/lib1958.c +++ b/tests/libtest/lib1958.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1958(char *URL) +static CURLcode test_lib1958(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1959.c b/tests/libtest/lib1959.c index 1b1f5b5731..d718149772 100644 --- a/tests/libtest/lib1959.c +++ b/tests/libtest/lib1959.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1959(char *URL) +static CURLcode test_lib1959(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1960.c b/tests/libtest/lib1960.c index ef8b3b8308..5cdc022426 100644 --- a/tests/libtest/lib1960.c +++ b/tests/libtest/lib1960.c @@ -72,7 +72,7 @@ static int sockopt_cb(void *clientp, /* Expected args: URL IP PORT */ -static CURLcode test_lib1960(char *URL) +static CURLcode test_lib1960(const char *URL) { CURL *curl = NULL; CURLcode res = TEST_ERR_MAJOR_BAD; @@ -144,7 +144,7 @@ test_cleanup: return res; } #else -static CURLcode test_lib1960(char *URL) +static CURLcode test_lib1960(const char *URL) { (void)URL; curl_mprintf("lacks inet_pton\n"); diff --git a/tests/libtest/lib1964.c b/tests/libtest/lib1964.c index ddc47ee956..cbad31dcc0 100644 --- a/tests/libtest/lib1964.c +++ b/tests/libtest/lib1964.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1964(char *URL) +static CURLcode test_lib1964(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib1970.c b/tests/libtest/lib1970.c index 5e2f8cc4b9..5ba51f6a58 100644 --- a/tests/libtest/lib1970.c +++ b/tests/libtest/lib1970.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1970(char *URL) +static CURLcode test_lib1970(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1971.c b/tests/libtest/lib1971.c index e67b9022b3..03b254c1c5 100644 --- a/tests/libtest/lib1971.c +++ b/tests/libtest/lib1971.c @@ -34,7 +34,7 @@ static size_t t1971_read_cb(char *ptr, size_t size, size_t nitems, void *userp) return 0; } -static CURLcode test_lib1971(char *URL) +static CURLcode test_lib1971(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1972.c b/tests/libtest/lib1972.c index d268be5b93..ec9c9b0698 100644 --- a/tests/libtest/lib1972.c +++ b/tests/libtest/lib1972.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1972(char *URL) +static CURLcode test_lib1972(const char *URL) { CURL *curl; curl_mime *mime = NULL; diff --git a/tests/libtest/lib1973.c b/tests/libtest/lib1973.c index a3afd3bba5..e887e80c2e 100644 --- a/tests/libtest/lib1973.c +++ b/tests/libtest/lib1973.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1973(char *URL) +static CURLcode test_lib1973(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1974.c b/tests/libtest/lib1974.c index 4640e18873..b2d0b59450 100644 --- a/tests/libtest/lib1974.c +++ b/tests/libtest/lib1974.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1974(char *URL) +static CURLcode test_lib1974(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1975.c b/tests/libtest/lib1975.c index cc8483fe57..95db9ae58d 100644 --- a/tests/libtest/lib1975.c +++ b/tests/libtest/lib1975.c @@ -34,7 +34,7 @@ static size_t t1975_read_cb(char *ptr, size_t size, size_t nitems, void *userp) return 0; } -static CURLcode test_lib1975(char *URL) +static CURLcode test_lib1975(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib1977.c b/tests/libtest/lib1977.c index a9294609ac..dae8bcbae7 100644 --- a/tests/libtest/lib1977.c +++ b/tests/libtest/lib1977.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1977(char *URL) +static CURLcode test_lib1977(const char *URL) { CURLcode res = CURLE_OK; CURLU *curlu = curl_url(); diff --git a/tests/libtest/lib1978.c b/tests/libtest/lib1978.c index 6ab0a034be..113f06da8f 100644 --- a/tests/libtest/lib1978.c +++ b/tests/libtest/lib1978.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib1978(char *URL) +static CURLcode test_lib1978(const char *URL) { CURL *curl; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib2023.c b/tests/libtest/lib2023.c index eb8e357da8..8c181fa093 100644 --- a/tests/libtest/lib2023.c +++ b/tests/libtest/lib2023.c @@ -83,7 +83,7 @@ static long parse_auth_name(const char *arg) return CURLAUTH_NONE; } -static CURLcode test_lib2023(char *URL) /* libauthretry */ +static CURLcode test_lib2023(const char *URL) /* libauthretry */ { CURLcode res; CURL *curl = NULL; diff --git a/tests/libtest/lib2032.c b/tests/libtest/lib2032.c index 993626bb35..5bca7d8728 100644 --- a/tests/libtest/lib2032.c +++ b/tests/libtest/lib2032.c @@ -76,7 +76,7 @@ static size_t callback(char *ptr, size_t size, size_t nmemb, void *data) return size * nmemb; } -static CURLcode test_lib2032(char *URL) /* libntlmconnect */ +static CURLcode test_lib2032(const char *URL) /* libntlmconnect */ { enum HandleState { ReadyForNewHandle, diff --git a/tests/libtest/lib2082.c b/tests/libtest/lib2082.c index f497de7a70..093eebda31 100644 --- a/tests/libtest/lib2082.c +++ b/tests/libtest/lib2082.c @@ -51,7 +51,7 @@ static int prereq_callback(void *clientp, return prereq_cb->prereq_retcode; } -static CURLcode test_lib2082(char *URL) /* libprereq */ +static CURLcode test_lib2082(const char *URL) /* libprereq */ { struct prcs prereq_cb; CURLcode ret = CURLE_OK; diff --git a/tests/libtest/lib2301.c b/tests/libtest/lib2301.c index 08c5d9d543..1a2eeb881a 100644 --- a/tests/libtest/lib2301.c +++ b/tests/libtest/lib2301.c @@ -120,7 +120,7 @@ static size_t t2301_write_cb(char *b, size_t size, size_t nitems, void *p) } #endif -static CURLcode test_lib2301(char *URL) +static CURLcode test_lib2301(const char *URL) { #ifndef CURL_DISABLE_WEBSOCKETS CURL *curl; diff --git a/tests/libtest/lib2302.c b/tests/libtest/lib2302.c index 1251d65749..d72761a851 100644 --- a/tests/libtest/lib2302.c +++ b/tests/libtest/lib2302.c @@ -92,7 +92,7 @@ static size_t t2302_write_cb(char *buffer, size_t size, size_t nitems, void *p) } #endif -static CURLcode test_lib2302(char *URL) +static CURLcode test_lib2302(const char *URL) { #ifndef CURL_DISABLE_WEBSOCKETS CURL *curl; diff --git a/tests/libtest/lib2304.c b/tests/libtest/lib2304.c index 750325045c..8950f1f25e 100644 --- a/tests/libtest/lib2304.c +++ b/tests/libtest/lib2304.c @@ -110,7 +110,7 @@ static void t2304_websocket(CURL *curl) } #endif -static CURLcode test_lib2304(char *URL) +static CURLcode test_lib2304(const char *URL) { #ifndef CURL_DISABLE_WEBSOCKETS CURL *curl; diff --git a/tests/libtest/lib2306.c b/tests/libtest/lib2306.c index 5d37d74dd3..d2832e1cb2 100644 --- a/tests/libtest/lib2306.c +++ b/tests/libtest/lib2306.c @@ -23,7 +23,7 @@ ***************************************************************************/ #include "first.h" -static CURLcode test_lib2306(char *URL) +static CURLcode test_lib2306(const char *URL) { /* first a fine GET response, then a bad one */ CURL *cl; diff --git a/tests/libtest/lib2308.c b/tests/libtest/lib2308.c index a66dcb70ca..1f7e6a4a2f 100644 --- a/tests/libtest/lib2308.c +++ b/tests/libtest/lib2308.c @@ -32,7 +32,7 @@ static size_t cb_curl(char *buffer, size_t size, size_t nmemb, void *userp) return CURL_WRITEFUNC_ERROR; } -static CURLcode test_lib2308(char *URL) +static CURLcode test_lib2308(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib2309.c b/tests/libtest/lib2309.c index d5df7cae07..afc92803d0 100644 --- a/tests/libtest/lib2309.c +++ b/tests/libtest/lib2309.c @@ -32,7 +32,7 @@ static size_t cb_ignore(char *buffer, size_t size, size_t nmemb, void *userp) return CURL_WRITEFUNC_ERROR; } -static CURLcode test_lib2309(char *URL) +static CURLcode test_lib2309(const char *URL) { CURL *curl; CURL *curldupe; diff --git a/tests/libtest/lib2402.c b/tests/libtest/lib2402.c index db932aac82..fcc6078a2e 100644 --- a/tests/libtest/lib2402.c +++ b/tests/libtest/lib2402.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib2402(char *URL) +static CURLcode test_lib2402(const char *URL) { CURLcode res = CURLE_OK; CURL *curl[NUM_HANDLES] = {0}; @@ -35,8 +35,8 @@ static CURLcode test_lib2402(char *URL) char target_url[256]; char dnsentry[256]; struct curl_slist *slist = NULL; - char *port = libtest_arg3; - char *address = libtest_arg2; + const char *port = libtest_arg3; + const char *address = libtest_arg2; (void)URL; diff --git a/tests/libtest/lib2404.c b/tests/libtest/lib2404.c index d4fec33b9b..3a35970108 100644 --- a/tests/libtest/lib2404.c +++ b/tests/libtest/lib2404.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib2404(char *URL) +static CURLcode test_lib2404(const char *URL) { CURLcode res = CURLE_OK; CURL *curl[NUM_HANDLES] = {0}; @@ -35,8 +35,8 @@ static CURLcode test_lib2404(char *URL) char target_url[256]; char dnsentry[256]; struct curl_slist *slist = NULL; - char *port = libtest_arg3; - char *address = libtest_arg2; + const char *port = libtest_arg3; + const char *address = libtest_arg2; (void)URL; diff --git a/tests/libtest/lib2405.c b/tests/libtest/lib2405.c index f1db830872..2d22276194 100644 --- a/tests/libtest/lib2405.c +++ b/tests/libtest/lib2405.c @@ -74,7 +74,7 @@ static size_t emptyWriteFunc(void *ptr, size_t size, size_t nmemb, return size * nmemb; } -static CURLcode set_easy(char *URL, CURL *easy, long option) +static CURLcode set_easy(const char *URL, CURL *easy, long option) { CURLcode res = CURLE_OK; @@ -116,7 +116,8 @@ test_cleanup: return res; } -static CURLcode test_run(char *URL, long option, unsigned int *max_fd_count) +static CURLcode test_run(const char *URL, long option, + unsigned int *max_fd_count) { CURLMcode mc = CURLM_OK; CURLM *multi = NULL; @@ -367,7 +368,7 @@ test_cleanup: return res; } -static CURLcode test_lib2405(char *URL) +static CURLcode test_lib2405(const char *URL) { CURLcode res = CURLE_OK; unsigned int fd_count = 0; diff --git a/tests/libtest/lib2502.c b/tests/libtest/lib2502.c index af31ce3936..ac8dbb11b5 100644 --- a/tests/libtest/lib2502.c +++ b/tests/libtest/lib2502.c @@ -26,7 +26,7 @@ #include "testtrace.h" #include "memdebug.h" -static CURLcode test_lib2502(char *URL) +static CURLcode test_lib2502(const char *URL) { CURLcode res = CURLE_OK; CURL *curl[NUM_HANDLES] = {0}; @@ -36,8 +36,8 @@ static CURLcode test_lib2502(char *URL) char target_url[256]; char dnsentry[256]; struct curl_slist *slist = NULL; - char *port = libtest_arg3; - char *address = libtest_arg2; + const char *port = libtest_arg3; + const char *address = libtest_arg2; (void)URL; diff --git a/tests/libtest/lib2700.c b/tests/libtest/lib2700.c index d2eff5577b..b7c2d901c2 100644 --- a/tests/libtest/lib2700.c +++ b/tests/libtest/lib2700.c @@ -209,7 +209,7 @@ static CURLcode recv_frame(CURL *curl, bool *stop) } #endif -static CURLcode test_lib2700(char *URL) +static CURLcode test_lib2700(const char *URL) { #ifndef CURL_DISABLE_WEBSOCKETS CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib3010.c b/tests/libtest/lib3010.c index 05979ad124..58271772ab 100644 --- a/tests/libtest/lib3010.c +++ b/tests/libtest/lib3010.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3010(char *URL) +static CURLcode test_lib3010(const char *URL) { CURLcode ret = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib3025.c b/tests/libtest/lib3025.c index 37d2d68079..b0056193b7 100644 --- a/tests/libtest/lib3025.c +++ b/tests/libtest/lib3025.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3025(char *URL) +static CURLcode test_lib3025(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib3026.c b/tests/libtest/lib3026.c index 0aefd9b724..13254098d2 100644 --- a/tests/libtest/lib3026.c +++ b/tests/libtest/lib3026.c @@ -42,7 +42,7 @@ static unsigned int WINAPI t3026_run_thread(void *ptr) return 0; } -static CURLcode test_lib3026(char *URL) +static CURLcode test_lib3026(const char *URL) { #if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE) typedef HANDLE curl_win_thread_handle_t; @@ -111,7 +111,7 @@ static void *t3026_run_thread(void *ptr) return NULL; } -static CURLcode test_lib3026(char *URL) +static CURLcode test_lib3026(const char *URL) { CURLcode results[NUM_THREADS]; pthread_t tids[NUM_THREADS]; @@ -156,7 +156,7 @@ cleanup: } #else /* without pthread or Windows, this test doesn't work */ -static CURLcode test_lib3026(char *URL) +static CURLcode test_lib3026(const char *URL) { curl_version_info_data *ver; (void)URL; diff --git a/tests/libtest/lib3027.c b/tests/libtest/lib3027.c index 7461e3f22a..735f4c96e9 100644 --- a/tests/libtest/lib3027.c +++ b/tests/libtest/lib3027.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3027(char *URL) +static CURLcode test_lib3027(const char *URL) { CURLcode ret = CURLE_OK; CURL *hnd; diff --git a/tests/libtest/lib3033.c b/tests/libtest/lib3033.c index f0a64198c8..e4befc2f53 100644 --- a/tests/libtest/lib3033.c +++ b/tests/libtest/lib3033.c @@ -21,13 +21,14 @@ * SPDX-License-Identifier: curl * ***************************************************************************/ +#include "first.h" + #include "testtrace.h" -#include "testutil.h" -#include "memdebug.h" +#include "memdebug.h" static CURLcode t3033_req_test(CURLM *multi, CURL *easy, - char *url_3033, int index) + const char *URL, int index) { CURLMsg *msg = NULL; CURLcode res = CURLE_OK; @@ -43,7 +44,7 @@ static CURLcode t3033_req_test(CURLM *multi, CURL *easy, } curl_easy_reset(easy); - curl_easy_setopt(easy, CURLOPT_URL, url_3033); + curl_easy_setopt(easy, CURLOPT_URL, URL); easy_setopt(easy, CURLOPT_DEBUGDATA, &libtest_debug_config); easy_setopt(easy, CURLOPT_DEBUGFUNCTION, libtest_debug_cb); easy_setopt(easy, CURLOPT_VERBOSE, 1L); @@ -96,7 +97,7 @@ test_cleanup: return res; } -static CURLcode test_lib3033(char *URL) +static CURLcode test_lib3033(const char *URL) { CURL *curl = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib3100.c b/tests/libtest/lib3100.c index 7942b9972c..b661aa76ce 100644 --- a/tests/libtest/lib3100.c +++ b/tests/libtest/lib3100.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3100(char *URL) +static CURLcode test_lib3100(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib3101.c b/tests/libtest/lib3101.c index b6e5b3ca09..3f5cbce17c 100644 --- a/tests/libtest/lib3101.c +++ b/tests/libtest/lib3101.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3101(char *URL) +static CURLcode test_lib3101(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib3102.c b/tests/libtest/lib3102.c index 6f5b813c5e..136ec0a1b7 100644 --- a/tests/libtest/lib3102.c +++ b/tests/libtest/lib3102.c @@ -89,7 +89,7 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void *stream) return size * nmemb; } -static CURLcode test_lib3102(char *URL) +static CURLcode test_lib3102(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib3103.c b/tests/libtest/lib3103.c index be607125d2..5b25e1cd41 100644 --- a/tests/libtest/lib3103.c +++ b/tests/libtest/lib3103.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3103(char *URL) +static CURLcode test_lib3103(const char *URL) { CURLcode res = CURLE_OK; CURLSH *share; diff --git a/tests/libtest/lib3104.c b/tests/libtest/lib3104.c index 20c2c154ef..dd1500ede5 100644 --- a/tests/libtest/lib3104.c +++ b/tests/libtest/lib3104.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3104(char *URL) +static CURLcode test_lib3104(const char *URL) { CURLcode res = CURLE_OK; CURLSH *share; diff --git a/tests/libtest/lib3105.c b/tests/libtest/lib3105.c index 962997a53e..5c231c2f82 100644 --- a/tests/libtest/lib3105.c +++ b/tests/libtest/lib3105.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3105(char *URL) +static CURLcode test_lib3105(const char *URL) { CURL *curls = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib3207.c b/tests/libtest/lib3207.c index 0f7c3d762a..4eca3dd024 100644 --- a/tests/libtest/lib3207.c +++ b/tests/libtest/lib3207.c @@ -169,7 +169,7 @@ static void execute(CURLSH *share, struct Ctx *ctx) #endif -static CURLcode test_lib3207(char *URL) +static CURLcode test_lib3207(const char *URL) { CURLcode res = CURLE_OK; size_t i; diff --git a/tests/libtest/lib3208.c b/tests/libtest/lib3208.c index 6dbf9bcadf..39585c1597 100644 --- a/tests/libtest/lib3208.c +++ b/tests/libtest/lib3208.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib3208(char *URL) +static CURLcode test_lib3208(const char *URL) { CURL *curl = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c index 84cd79346b..2a2365fd9f 100644 --- a/tests/libtest/lib500.c +++ b/tests/libtest/lib500.c @@ -52,7 +52,7 @@ static void setupcallbacks(CURL *curl) testcounter = 0; } -static CURLcode test_lib500(char *URL) +static CURLcode test_lib500(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib501.c b/tests/libtest/lib501.c index e770a72d4e..d32e4397b8 100644 --- a/tests/libtest/lib501.c +++ b/tests/libtest/lib501.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib501(char *URL) +static CURLcode test_lib501(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c index a18e6976b9..9a51267aae 100644 --- a/tests/libtest/lib502.c +++ b/tests/libtest/lib502.c @@ -29,7 +29,7 @@ * Get a single URL without select(). */ -static CURLcode test_lib502(char *URL) +static CURLcode test_lib502(const char *URL) { CURL *c = NULL; CURLM *m = NULL; diff --git a/tests/libtest/lib503.c b/tests/libtest/lib503.c index 0598b1bcff..f7529d47b7 100644 --- a/tests/libtest/lib503.c +++ b/tests/libtest/lib503.c @@ -33,7 +33,7 @@ * auth info. */ -static CURLcode test_lib503(char *URL) +static CURLcode test_lib503(const char *URL) { CURL *c = NULL; CURLM *m = NULL; diff --git a/tests/libtest/lib504.c b/tests/libtest/lib504.c index a795571cc1..07b46345bb 100644 --- a/tests/libtest/lib504.c +++ b/tests/libtest/lib504.c @@ -32,7 +32,7 @@ * Use multi interface to get document over proxy with bad port number. * This caused the interface to "hang" in libcurl 7.10.2. */ -static CURLcode test_lib504(char *URL) +static CURLcode test_lib504(const char *URL) { CURL *c = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib505.c b/tests/libtest/lib505.c index 4f4c5c9f39..2285208e9f 100644 --- a/tests/libtest/lib505.c +++ b/tests/libtest/lib505.c @@ -32,7 +32,7 @@ * Example based on source code provided by Erick Nuwendam. Thanks! */ -static CURLcode test_lib505(char *URL) +static CURLcode test_lib505(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c index 384bf26db6..ba82c9a42d 100644 --- a/tests/libtest/lib506.c +++ b/tests/libtest/lib506.c @@ -163,7 +163,7 @@ static void *t506_test_fire(void *ptr) } /* test function */ -static CURLcode test_lib506(char *URL) +static CURLcode test_lib506(const char *URL) { CURLcode res; CURLSHcode scode = CURLSHE_OK; diff --git a/tests/libtest/lib507.c b/tests/libtest/lib507.c index e6eacfd2ec..de23b02f0a 100644 --- a/tests/libtest/lib507.c +++ b/tests/libtest/lib507.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib507(char *URL) +static CURLcode test_lib507(const char *URL) { CURL *curls = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c index 0cb749103f..a4c25b7918 100644 --- a/tests/libtest/lib508.c +++ b/tests/libtest/lib508.c @@ -47,7 +47,7 @@ static size_t t508_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib508(char *URL) +static CURLcode test_lib508(const char *URL) { static const char testdata[] = "this is what we post to the silly web server\n"; diff --git a/tests/libtest/lib509.c b/tests/libtest/lib509.c index d0cba1281d..a8be3eae52 100644 --- a/tests/libtest/lib509.c +++ b/tests/libtest/lib509.c @@ -67,7 +67,7 @@ static void custom_free(void *ptr) } -static CURLcode test_lib509(char *URL) +static CURLcode test_lib509(const char *URL) { static const unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7}; diff --git a/tests/libtest/lib510.c b/tests/libtest/lib510.c index c5d4a5582e..da270c1c92 100644 --- a/tests/libtest/lib510.c +++ b/tests/libtest/lib510.c @@ -60,7 +60,7 @@ static size_t t510_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib510(char *URL) +static CURLcode test_lib510(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib511.c b/tests/libtest/lib511.c index 30b31469f7..1db4093780 100644 --- a/tests/libtest/lib511.c +++ b/tests/libtest/lib511.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib511(char *URL) +static CURLcode test_lib511(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib512.c b/tests/libtest/lib512.c index 458227eeb4..59a1cd7595 100644 --- a/tests/libtest/lib512.c +++ b/tests/libtest/lib512.c @@ -28,7 +28,7 @@ /* Test case code based on source in a bug report filed by James Bursa on 28 Apr 2004 */ -static CURLcode test_lib512(char *URL) +static CURLcode test_lib512(const char *URL) { CURLcode code; int rc = 99; diff --git a/tests/libtest/lib513.c b/tests/libtest/lib513.c index 51749b9fda..3d0afb1191 100644 --- a/tests/libtest/lib513.c +++ b/tests/libtest/lib513.c @@ -34,7 +34,7 @@ static size_t t513_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return CURL_READFUNC_ABORT; } -static CURLcode test_lib513(char *URL) +static CURLcode test_lib513(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c index 8580d44999..f47cdb321d 100644 --- a/tests/libtest/lib514.c +++ b/tests/libtest/lib514.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib514(char *URL) +static CURLcode test_lib514(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib515.c b/tests/libtest/lib515.c index 511f077540..d9814525df 100644 --- a/tests/libtest/lib515.c +++ b/tests/libtest/lib515.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib515(char *URL) +static CURLcode test_lib515(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib516.c b/tests/libtest/lib516.c index 8582110c3e..b7778a6a76 100644 --- a/tests/libtest/lib516.c +++ b/tests/libtest/lib516.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib516(char *URL) +static CURLcode test_lib516(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib517.c b/tests/libtest/lib517.c index 5324d6378f..cf1a14d31c 100644 --- a/tests/libtest/lib517.c +++ b/tests/libtest/lib517.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib517(char *URL) +static CURLcode test_lib517(const char *URL) { struct dcheck { const char *input; diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c index e99bb9c388..86eddec003 100644 --- a/tests/libtest/lib518.c +++ b/tests/libtest/lib518.c @@ -421,7 +421,7 @@ static int t518_test_rlimit(int keep_open) return 0; } -static CURLcode test_lib518(char *URL) +static CURLcode test_lib518(const char *URL) { CURLcode res; CURL *curl; @@ -473,7 +473,7 @@ test_cleanup: #else /* HAVE_GETRLIMIT && HAVE_SETRLIMIT */ -static CURLcode test_lib518(char *URL) +static CURLcode test_lib518(const char *URL) { (void)URL; curl_mprintf("system lacks necessary system function(s)"); diff --git a/tests/libtest/lib519.c b/tests/libtest/lib519.c index 7848681bc4..615e8aac8a 100644 --- a/tests/libtest/lib519.c +++ b/tests/libtest/lib519.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib519(char *URL) +static CURLcode test_lib519(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib520.c b/tests/libtest/lib520.c index 6b8f4edd06..34f7c541e2 100644 --- a/tests/libtest/lib520.c +++ b/tests/libtest/lib520.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib520(char *URL) +static CURLcode test_lib520(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c index 9230984344..32bf7b3022 100644 --- a/tests/libtest/lib521.c +++ b/tests/libtest/lib521.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib521(char *URL) +static CURLcode test_lib521(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib523.c b/tests/libtest/lib523.c index 4b8a52660b..3b56ada894 100644 --- a/tests/libtest/lib523.c +++ b/tests/libtest/lib523.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib523(char *URL) +static CURLcode test_lib523(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib524.c b/tests/libtest/lib524.c index 884afb7b77..e015e58637 100644 --- a/tests/libtest/lib524.c +++ b/tests/libtest/lib524.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib524(char *URL) +static CURLcode test_lib524(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c index 0c60710870..6c7d650366 100644 --- a/tests/libtest/lib525.c +++ b/tests/libtest/lib525.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib525(char *URL) +static CURLcode test_lib525(const char *URL) { CURLcode res = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib526.c b/tests/libtest/lib526.c index de097e1b04..8cf0687441 100644 --- a/tests/libtest/lib526.c +++ b/tests/libtest/lib526.c @@ -44,7 +44,7 @@ #include "memdebug.h" -static CURLcode test_lib526(char *URL) +static CURLcode test_lib526(const char *URL) { CURLcode res = CURLE_OK; CURL *curl[NUM_HANDLES]; diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c index 3a15bfb0a2..4ac5b16072 100644 --- a/tests/libtest/lib530.c +++ b/tests/libtest/lib530.c @@ -279,7 +279,7 @@ static int t530_checkFdSet(CURLM *curl, struct t530_Sockets *sockets, return result; } -static CURLcode testone(char *URL, int timer_fail_at, int socket_fail_at) +static CURLcode testone(const char *URL, int timer_fail_at, int socket_fail_at) { CURLcode res = CURLE_OK; CURL *curl = NULL; CURLM *m = NULL; @@ -393,7 +393,7 @@ test_cleanup: return res; } -static CURLcode test_lib530(char *URL) +static CURLcode test_lib530(const char *URL) { CURLcode rc; /* rerun the same transfer multiple times and make it fail in different diff --git a/tests/libtest/lib533.c b/tests/libtest/lib533.c index 064ff9d7a3..adba324f66 100644 --- a/tests/libtest/lib533.c +++ b/tests/libtest/lib533.c @@ -27,7 +27,7 @@ #include "memdebug.h" -static CURLcode test_lib533(char *URL) +static CURLcode test_lib533(const char *URL) { CURLcode res = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib536.c b/tests/libtest/lib536.c index 6e5a83cab9..6c8b8ee1d8 100644 --- a/tests/libtest/lib536.c +++ b/tests/libtest/lib536.c @@ -37,7 +37,7 @@ static void proxystat(CURL *curl) } } -static CURLcode test_lib536(char *URL) +static CURLcode test_lib536(const char *URL) { CURLcode res = CURLE_OK; CURL *curl; diff --git a/tests/libtest/lib537.c b/tests/libtest/lib537.c index ddd8b1253e..fa03c3b983 100644 --- a/tests/libtest/lib537.c +++ b/tests/libtest/lib537.c @@ -435,7 +435,7 @@ static int t537_test_rlimit(int keep_open) return 0; } -static CURLcode test_lib537(char *URL) +static CURLcode test_lib537(const char *URL) { CURLcode res; CURL *curl; @@ -487,7 +487,7 @@ test_cleanup: #else /* HAVE_GETRLIMIT && HAVE_SETRLIMIT */ -static CURLcode test_lib537(char *URL) +static CURLcode test_lib537(const char *URL) { (void)URL; curl_mprintf("system lacks necessary system function(s)"); diff --git a/tests/libtest/lib539.c b/tests/libtest/lib539.c index 4b333807e3..e4e26c204a 100644 --- a/tests/libtest/lib539.c +++ b/tests/libtest/lib539.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib539(char *URL) +static CURLcode test_lib539(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib540.c b/tests/libtest/lib540.c index b4c8a00eeb..22611189e2 100644 --- a/tests/libtest/lib540.c +++ b/tests/libtest/lib540.c @@ -184,7 +184,7 @@ static CURLcode loop(int num, CURLM *cm, const char *url, const char *userpwd, return CURLE_OK; } -static CURLcode test_lib540(char *URL) +static CURLcode test_lib540(const char *URL) { CURLM *cm = NULL; struct curl_slist *headers = NULL; diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c index 9ae605a183..9868474d01 100644 --- a/tests/libtest/lib541.c +++ b/tests/libtest/lib541.c @@ -29,7 +29,7 @@ * Two FTP uploads, the second with no content sent. */ -static CURLcode test_lib541(char *URL) +static CURLcode test_lib541(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib542.c b/tests/libtest/lib542.c index cb065d722a..e6e73131fd 100644 --- a/tests/libtest/lib542.c +++ b/tests/libtest/lib542.c @@ -29,7 +29,7 @@ * FTP get with NOBODY but no HEADER */ -static CURLcode test_lib542(char *URL) +static CURLcode test_lib542(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib543.c b/tests/libtest/lib543.c index d759e5eb03..d3653dbccd 100644 --- a/tests/libtest/lib543.c +++ b/tests/libtest/lib543.c @@ -27,7 +27,7 @@ #include "memdebug.h" -static CURLcode test_lib543(char *URL) +static CURLcode test_lib543(const char *URL) { static const unsigned char a[] = { 0x9c, 0x26, 0x4b, 0x3d, 0x49, 0x4, 0xa1, 0x1, diff --git a/tests/libtest/lib544.c b/tests/libtest/lib544.c index 0a70b72e7e..f5dcb5383c 100644 --- a/tests/libtest/lib544.c +++ b/tests/libtest/lib544.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib544(char *URL) +static CURLcode test_lib544(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib547.c b/tests/libtest/lib547.c index 9099b458c9..8892dab028 100644 --- a/tests/libtest/lib547.c +++ b/tests/libtest/lib547.c @@ -63,7 +63,7 @@ static curlioerr t547_ioctl_callback(CURL *handle, int cmd, void *clientp) return CURLIOE_OK; } -static CURLcode test_lib547(char *URL) +static CURLcode test_lib547(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib549.c b/tests/libtest/lib549.c index 555cd7d620..4eaacf5868 100644 --- a/tests/libtest/lib549.c +++ b/tests/libtest/lib549.c @@ -30,7 +30,7 @@ #include "memdebug.h" -static CURLcode test_lib549(char *URL) +static CURLcode test_lib549(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib552.c b/tests/libtest/lib552.c index 9a97d110af..50308b963b 100644 --- a/tests/libtest/lib552.c +++ b/tests/libtest/lib552.c @@ -157,7 +157,7 @@ static curlioerr ioctl_callback(CURL *handle, int cmd, void *clientp) return CURLIOE_UNKNOWNCMD; } -static CURLcode test_lib552(char *URL) +static CURLcode test_lib552(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib553.c b/tests/libtest/lib553.c index e1933821bd..0d44573131 100644 --- a/tests/libtest/lib553.c +++ b/tests/libtest/lib553.c @@ -55,7 +55,7 @@ static size_t myreadfunc(char *ptr, size_t size, size_t nmemb, void *stream) #define NUM_HEADERS 8 #define SIZE_HEADERS 5000 -static CURLcode test_lib553(char *URL) +static CURLcode test_lib553(const char *URL) { static char testbuf[SIZE_HEADERS + 100]; diff --git a/tests/libtest/lib554.c b/tests/libtest/lib554.c index 49d95a1259..f705fbbd3e 100644 --- a/tests/libtest/lib554.c +++ b/tests/libtest/lib554.c @@ -56,7 +56,7 @@ static size_t t587_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return CURL_READFUNC_ABORT; } -static CURLcode t554_test_once(char *URL, bool oldstyle) +static CURLcode t554_test_once(const char *URL, bool oldstyle) { static const char testdata[] = "this is what we post to the silly web server\n"; @@ -192,7 +192,7 @@ test_cleanup: return res; } -static CURLcode test_lib554(char *URL) +static CURLcode test_lib554(const char *URL) { CURLcode res; diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c index a71df17714..97a5d874b3 100644 --- a/tests/libtest/lib555.c +++ b/tests/libtest/lib555.c @@ -67,7 +67,7 @@ static curlioerr t555_ioctl_callback(CURL *handle, int cmd, void *clientp) return CURLIOE_OK; } -static CURLcode test_lib555(char *URL) +static CURLcode test_lib555(const char *URL) { CURLcode res = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib556.c b/tests/libtest/lib556.c index a7104c8a6c..7b155a2528 100644 --- a/tests/libtest/lib556.c +++ b/tests/libtest/lib556.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib556(char *URL) +static CURLcode test_lib556(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib557.c b/tests/libtest/lib557.c index 097f4845c0..8c12e960f7 100644 --- a/tests/libtest/lib557.c +++ b/tests/libtest/lib557.c @@ -1539,7 +1539,7 @@ static int test_return_codes(void) return 0; } -static CURLcode test_lib557(char *URL) +static CURLcode test_lib557(const char *URL) { int errors = 0; (void)URL; /* not used */ diff --git a/tests/libtest/lib558.c b/tests/libtest/lib558.c index 07f75dcd9d..795a0b74b3 100644 --- a/tests/libtest/lib558.c +++ b/tests/libtest/lib558.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib558(char *URL) +static CURLcode test_lib558(const char *URL) { unsigned char a[] = {0x2f, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x91, 0xa2, 0xb3, 0xc4, 0xd5, 0xe6, 0xf7}; diff --git a/tests/libtest/lib559.c b/tests/libtest/lib559.c index 987dc708ad..36a5575126 100644 --- a/tests/libtest/lib559.c +++ b/tests/libtest/lib559.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib559(char *URL) +static CURLcode test_lib559(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c index f6a398e17f..060e27eea0 100644 --- a/tests/libtest/lib560.c +++ b/tests/libtest/lib560.c @@ -35,7 +35,7 @@ * fast/different compared to the real/distant servers we saw the bug happen * with. */ -static CURLcode test_lib560(char *URL) +static CURLcode test_lib560(const char *URL) { CURL *http_handle = NULL; CURLM *multi_handle = NULL; diff --git a/tests/libtest/lib562.c b/tests/libtest/lib562.c index c6a391cf65..016dffe1bd 100644 --- a/tests/libtest/lib562.c +++ b/tests/libtest/lib562.c @@ -33,7 +33,7 @@ */ -static CURLcode test_lib562(char *URL) +static CURLcode test_lib562(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib564.c b/tests/libtest/lib564.c index 2cf3102ad3..86e4f9ed06 100644 --- a/tests/libtest/lib564.c +++ b/tests/libtest/lib564.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib564(char *URL) +static CURLcode test_lib564(const char *URL) { CURLcode res = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib566.c b/tests/libtest/lib566.c index fc9d929f3d..15221cd0cc 100644 --- a/tests/libtest/lib566.c +++ b/tests/libtest/lib566.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib566(char *URL) +static CURLcode test_lib566(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib567.c b/tests/libtest/lib567.c index 6752935469..a11a6c31f0 100644 --- a/tests/libtest/lib567.c +++ b/tests/libtest/lib567.c @@ -28,7 +28,7 @@ /* * Test a simple OPTIONS request with a custom header */ -static CURLcode test_lib567(char *URL) +static CURLcode test_lib567(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib568.c b/tests/libtest/lib568.c index b0e8b610d2..8e34194ef5 100644 --- a/tests/libtest/lib568.c +++ b/tests/libtest/lib568.c @@ -29,7 +29,7 @@ /* * Test the Client->Server ANNOUNCE functionality (PUT style) */ -static CURLcode test_lib568(char *URL) +static CURLcode test_lib568(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib569.c b/tests/libtest/lib569.c index 57cb460268..3a2d031072 100644 --- a/tests/libtest/lib569.c +++ b/tests/libtest/lib569.c @@ -29,7 +29,7 @@ /* * Test Session ID capture */ -static CURLcode test_lib569(char *URL) +static CURLcode test_lib569(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib570.c b/tests/libtest/lib570.c index 76eddfb032..18a4d47efb 100644 --- a/tests/libtest/lib570.c +++ b/tests/libtest/lib570.c @@ -26,7 +26,7 @@ #include "testutil.h" #include "memdebug.h" -static CURLcode test_lib570(char *URL) +static CURLcode test_lib570(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c index 4a8d805bf0..0350fb36cd 100644 --- a/tests/libtest/lib571.c +++ b/tests/libtest/lib571.c @@ -90,7 +90,7 @@ static size_t rtp_write(char *ptr, size_t size, size_t nmemb, void *stream) return size * nmemb; } -static CURLcode test_lib571(char *URL) +static CURLcode test_lib571(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib572.c b/tests/libtest/lib572.c index cf5fa7c914..ea9e34e068 100644 --- a/tests/libtest/lib572.c +++ b/tests/libtest/lib572.c @@ -29,7 +29,7 @@ /* * Test GET_PARAMETER: PUT, HEARTBEAT, and POST */ -static CURLcode test_lib572(char *URL) +static CURLcode test_lib572(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c index 2cfecc09cc..735f1781c1 100644 --- a/tests/libtest/lib573.c +++ b/tests/libtest/lib573.c @@ -30,7 +30,7 @@ * Get a single URL without select(). */ -static CURLcode test_lib573(char *URL) +static CURLcode test_lib573(const char *URL) { CURL *c = NULL; CURLM *m = NULL; diff --git a/tests/libtest/lib574.c b/tests/libtest/lib574.c index de12349a28..23ec30e322 100644 --- a/tests/libtest/lib574.c +++ b/tests/libtest/lib574.c @@ -34,7 +34,7 @@ static int new_fnmatch(void *ptr, return CURL_FNMATCHFUNC_MATCH; } -static CURLcode test_lib574(char *URL) +static CURLcode test_lib574(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib575.c b/tests/libtest/lib575.c index e474721778..a0ac02f852 100644 --- a/tests/libtest/lib575.c +++ b/tests/libtest/lib575.c @@ -31,7 +31,7 @@ * 3. with multi interface */ -static CURLcode test_lib575(char *URL) +static CURLcode test_lib575(const char *URL) { CURL *handle = NULL; CURL *duphandle = NULL; diff --git a/tests/libtest/lib576.c b/tests/libtest/lib576.c index 5c58c0a560..d0fedd817d 100644 --- a/tests/libtest/lib576.c +++ b/tests/libtest/lib576.c @@ -96,7 +96,7 @@ static long chunk_end(void *ptr) return CURL_CHUNK_END_FUNC_OK; } -static CURLcode test_lib576(char *URL) +static CURLcode test_lib576(const char *URL) { CURL *handle = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib578.c b/tests/libtest/lib578.c index 22a2cf17bb..5b46c8e622 100644 --- a/tests/libtest/lib578.c +++ b/tests/libtest/lib578.c @@ -50,7 +50,7 @@ static int t578_progress_callback(void *clientp, double dltotal, double dlnow, return 0; } -static CURLcode test_lib578(char *URL) +static CURLcode test_lib578(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c index 8ec94c3f66..4f6b67e540 100644 --- a/tests/libtest/lib579.c +++ b/tests/libtest/lib579.c @@ -100,7 +100,7 @@ static size_t t579_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib579(char *URL) +static CURLcode test_lib579(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib582.c b/tests/libtest/lib582.c index 7ba53aca3d..f511c0c3a2 100644 --- a/tests/libtest/lib582.c +++ b/tests/libtest/lib582.c @@ -221,7 +221,7 @@ static void t582_checkFdSet(CURLM *curl, struct t582_Sockets *sockets, } } -static CURLcode test_lib582(char *URL) +static CURLcode test_lib582(const char *URL) { CURLcode res = CURLE_OK; CURL *curl = NULL; diff --git a/tests/libtest/lib583.c b/tests/libtest/lib583.c index 07e0e4ac45..10cb77689e 100644 --- a/tests/libtest/lib583.c +++ b/tests/libtest/lib583.c @@ -30,7 +30,7 @@ #include "memdebug.h" -static CURLcode test_lib583(char *URL) +static CURLcode test_lib583(const char *URL) { int stillRunning; CURLM *multiHandle = NULL; diff --git a/tests/libtest/lib586.c b/tests/libtest/lib586.c index feb7ecdd12..ccde713ce3 100644 --- a/tests/libtest/lib586.c +++ b/tests/libtest/lib586.c @@ -30,7 +30,7 @@ /* struct containing data of a thread */ struct t586_Tdata { CURLSH *share; - char *url; + const char *url; }; struct t586_userdata { @@ -130,11 +130,10 @@ static void *t586_test_fire(void *ptr) } /* test function */ -static CURLcode test_lib586(char *URL) +static CURLcode test_lib586(const char *URL) { CURLcode res = CURLE_OK; CURLSHcode scode = CURLSHE_OK; - char *url; struct t586_Tdata tdata; CURL *curl; CURLSH *share; @@ -208,8 +207,7 @@ static CURLcode test_lib586(char *URL) return TEST_ERR_MAJOR_BAD; } - url = URL; - test_setopt(curl, CURLOPT_URL, url); + test_setopt(curl, CURLOPT_URL, URL); curl_mprintf("CURLOPT_SHARE\n"); test_setopt(curl, CURLOPT_SHARE, share); diff --git a/tests/libtest/lib589.c b/tests/libtest/lib589.c index 760b2dcde8..9b912ab037 100644 --- a/tests/libtest/lib589.c +++ b/tests/libtest/lib589.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib589(char *URL) +static CURLcode test_lib589(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib590.c b/tests/libtest/lib590.c index d11f7fc09c..c804f995de 100644 --- a/tests/libtest/lib590.c +++ b/tests/libtest/lib590.c @@ -39,7 +39,7 @@ #include "memdebug.h" -static CURLcode test_lib590(char *URL) +static CURLcode test_lib590(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c index 82568babc3..1f09fbdc4d 100644 --- a/tests/libtest/lib591.c +++ b/tests/libtest/lib591.c @@ -27,7 +27,7 @@ #include "memdebug.h" -static CURLcode test_lib591(char *URL) +static CURLcode test_lib591(const char *URL) { CURL *easy = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib597.c b/tests/libtest/lib597.c index 0bbc9671d1..126ce74f38 100644 --- a/tests/libtest/lib597.c +++ b/tests/libtest/lib597.c @@ -34,7 +34,7 @@ * with function curl_multi_info_read(). */ -static CURLcode test_lib597(char *URL) +static CURLcode test_lib597(const char *URL) { CURL *easy = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/lib598.c b/tests/libtest/lib598.c index fdcb9fe3a6..56330c4a24 100644 --- a/tests/libtest/lib598.c +++ b/tests/libtest/lib598.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib598(char *URL) +static CURLcode test_lib598(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib599.c b/tests/libtest/lib599.c index 116ae648f9..5b52698a29 100644 --- a/tests/libtest/lib599.c +++ b/tests/libtest/lib599.c @@ -41,7 +41,7 @@ static int t599_progress_callback(void *clientp, double dltotal, return 0; } -static CURLcode test_lib599(char *URL) +static CURLcode test_lib599(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib643.c b/tests/libtest/lib643.c index 95c562387d..34c6ee947c 100644 --- a/tests/libtest/lib643.c +++ b/tests/libtest/lib643.c @@ -56,7 +56,7 @@ static size_t t643_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode t643_test_once(char *URL, bool oldstyle) +static CURLcode t643_test_once(const char *URL, bool oldstyle) { static const char testdata[] = "dummy\n"; @@ -247,7 +247,7 @@ static CURLcode t643_cyclic_add(void) return CURLE_OK; } -static CURLcode test_lib643(char *URL) +static CURLcode test_lib643(const char *URL) { CURLcode res; diff --git a/tests/libtest/lib650.c b/tests/libtest/lib650.c index f6a4b692ab..42fa5b822c 100644 --- a/tests/libtest/lib650.c +++ b/tests/libtest/lib650.c @@ -39,7 +39,7 @@ static size_t count_chars(void *userp, const char *buf, size_t len) return len; } -static CURLcode test_lib650(char *URL) +static CURLcode test_lib650(const char *URL) { CURL *curl = NULL; CURLcode res = TEST_ERR_MAJOR_BAD; diff --git a/tests/libtest/lib651.c b/tests/libtest/lib651.c index cb029abe4c..904eafc626 100644 --- a/tests/libtest/lib651.c +++ b/tests/libtest/lib651.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib651(char *URL) +static CURLcode test_lib651(const char *URL) { static char testbuf[17000]; /* more than 16K */ diff --git a/tests/libtest/lib652.c b/tests/libtest/lib652.c index e5c6a2bebb..dcbc5a3ab3 100644 --- a/tests/libtest/lib652.c +++ b/tests/libtest/lib652.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib652(char *URL) +static CURLcode test_lib652(const char *URL) { static char testbuf[17000]; /* more than 16K */ diff --git a/tests/libtest/lib653.c b/tests/libtest/lib653.c index e1cdb2b335..4f20865e26 100644 --- a/tests/libtest/lib653.c +++ b/tests/libtest/lib653.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib653(char *URL) +static CURLcode test_lib653(const char *URL) { CURL *curls = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib654.c b/tests/libtest/lib654.c index e3b9d2f6f2..a808e24a0a 100644 --- a/tests/libtest/lib654.c +++ b/tests/libtest/lib654.c @@ -59,7 +59,7 @@ static size_t t654_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib654(char *URL) +static CURLcode test_lib654(const char *URL) { static const char testdata[] = "dummy\n"; diff --git a/tests/libtest/lib655.c b/tests/libtest/lib655.c index 34d5f8a3bf..d1bf80473d 100644 --- a/tests/libtest/lib655.c +++ b/tests/libtest/lib655.c @@ -58,7 +58,7 @@ static int resolver_alloc_cb_pass(void *resolver_state, void *reserved, return 0; } -static CURLcode test_lib655(char *URL) +static CURLcode test_lib655(const char *URL) { CURL *curl; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib658.c b/tests/libtest/lib658.c index 410ab070e9..00a2a35906 100644 --- a/tests/libtest/lib658.c +++ b/tests/libtest/lib658.c @@ -29,7 +29,7 @@ * Get a single URL without select(). */ -static CURLcode test_lib658(char *URL) +static CURLcode test_lib658(const char *URL) { CURL *handle = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib659.c b/tests/libtest/lib659.c index d926c513bb..70a630758c 100644 --- a/tests/libtest/lib659.c +++ b/tests/libtest/lib659.c @@ -29,7 +29,7 @@ * Get a single URL without select(). */ -static CURLcode test_lib659(char *URL) +static CURLcode test_lib659(const char *URL) { CURL *handle = NULL; CURLcode res = CURLE_OK; diff --git a/tests/libtest/lib661.c b/tests/libtest/lib661.c index 8f14d27b6a..ce1eca1a6f 100644 --- a/tests/libtest/lib661.c +++ b/tests/libtest/lib661.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib661(char *URL) +static CURLcode test_lib661(const char *URL) { CURLcode res; CURL *curl = NULL; diff --git a/tests/libtest/lib666.c b/tests/libtest/lib666.c index b4034b7a01..cff244dafb 100644 --- a/tests/libtest/lib666.c +++ b/tests/libtest/lib666.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib666(char *URL) +static CURLcode test_lib666(const char *URL) { static char testbuf[17000]; /* more than 16K */ diff --git a/tests/libtest/lib667.c b/tests/libtest/lib667.c index d9053d2818..a46d1b8cdd 100644 --- a/tests/libtest/lib667.c +++ b/tests/libtest/lib667.c @@ -51,7 +51,7 @@ static size_t t667_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return 0; /* no more data left to deliver */ } -static CURLcode test_lib667(char *URL) +static CURLcode test_lib667(const char *URL) { static const char testdata[] = "dummy"; diff --git a/tests/libtest/lib668.c b/tests/libtest/lib668.c index 1eaf5b15f3..219fb8b150 100644 --- a/tests/libtest/lib668.c +++ b/tests/libtest/lib668.c @@ -46,7 +46,7 @@ static size_t t668_read_cb(char *ptr, size_t size, size_t nmemb, void *userp) return len; } -static CURLcode test_lib668(char *URL) +static CURLcode test_lib668(const char *URL) { static const char testdata[] = "dummy"; diff --git a/tests/libtest/lib670.c b/tests/libtest/lib670.c index f77458eff2..6742b8e4d9 100644 --- a/tests/libtest/lib670.c +++ b/tests/libtest/lib670.c @@ -85,7 +85,7 @@ static int t670_xferinfo(void *clientp, return 0; } -static CURLcode test_lib670(char *URL) +static CURLcode test_lib670(const char *URL) { static const char testname[] = "field"; diff --git a/tests/libtest/lib674.c b/tests/libtest/lib674.c index 0da7af317d..a46f2be6eb 100644 --- a/tests/libtest/lib674.c +++ b/tests/libtest/lib674.c @@ -29,7 +29,7 @@ * Get a single URL without select(). */ -static CURLcode test_lib674(char *URL) +static CURLcode test_lib674(const char *URL) { CURL *handle = NULL; CURL *handle2; diff --git a/tests/libtest/lib676.c b/tests/libtest/lib676.c index 264127f707..63437523df 100644 --- a/tests/libtest/lib676.c +++ b/tests/libtest/lib676.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib676(char *URL) +static CURLcode test_lib676(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib677.c b/tests/libtest/lib677.c index 1b54eb669a..8776c30d81 100644 --- a/tests/libtest/lib677.c +++ b/tests/libtest/lib677.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib677(char *URL) +static CURLcode test_lib677(const char *URL) { static const char testcmd[] = "A1 IDLE\r\n"; static char testbuf[1024]; diff --git a/tests/libtest/lib678.c b/tests/libtest/lib678.c index cad7b9843e..78e03c004f 100644 --- a/tests/libtest/lib678.c +++ b/tests/libtest/lib678.c @@ -94,7 +94,7 @@ static CURLcode test_cert_blob(const char *url, const char *cafile) return code; } -static CURLcode test_lib678(char *URL) +static CURLcode test_lib678(const char *URL) { CURLcode res = CURLE_OK; curl_global_init(CURL_GLOBAL_DEFAULT); diff --git a/tests/libtest/lib694.c b/tests/libtest/lib694.c index e637946c96..eb760fbee2 100644 --- a/tests/libtest/lib694.c +++ b/tests/libtest/lib694.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_lib694(char *URL) +static CURLcode test_lib694(const char *URL) { CURLcode res; CURL *curl; diff --git a/tests/libtest/lib695.c b/tests/libtest/lib695.c index 70b7903055..325897c357 100644 --- a/tests/libtest/lib695.c +++ b/tests/libtest/lib695.c @@ -33,7 +33,7 @@ static size_t write_it(char *ptr, size_t size, size_t nmemb, void *userdata) return size * nmemb; } -static CURLcode test_lib695(char *URL) +static CURLcode test_lib695(const char *URL) { CURL *curl = NULL; curl_mime *mime1 = NULL; diff --git a/tests/libtest/lib751.c b/tests/libtest/lib751.c index bc8ddcfdcb..0e0a1968e6 100644 --- a/tests/libtest/lib751.c +++ b/tests/libtest/lib751.c @@ -29,7 +29,7 @@ * Get a single URL without select(). */ -static CURLcode test_lib751(char *URL) +static CURLcode test_lib751(const char *URL) { CURL *easies[1000]; CURLM *m; diff --git a/tests/libtest/lib753.c b/tests/libtest/lib753.c index 36b45e7648..1b86f1aec5 100644 --- a/tests/libtest/lib753.c +++ b/tests/libtest/lib753.c @@ -61,7 +61,7 @@ static size_t t753_hd_cb(char *ptr, size_t size, size_t nmemb, void *userp) return len; } -static bool t753_setup(char *URL, const char *name, +static bool t753_setup(const char *URL, const char *name, CURL **peasy, struct t753_transfer_status *st) { @@ -96,7 +96,7 @@ test_cleanup: return FALSE; } -static CURLcode test_lib753(char *URL) +static CURLcode test_lib753(const char *URL) { CURL *easy1 = NULL, *easy2 = NULL; CURLM *multi = NULL; diff --git a/tests/libtest/mk-lib1521.pl b/tests/libtest/mk-lib1521.pl index 0dc4fe15e0..3674270fa7 100755 --- a/tests/libtest/mk-lib1521.pl +++ b/tests/libtest/mk-lib1521.pl @@ -326,7 +326,7 @@ static bool bad_long(CURLcode res, int check) non-existing function return code back */ #define present(x) ((x != CURLE_NOT_BUILT_IN) && (x != CURLE_UNKNOWN_OPTION)) -static CURLcode test_lib1521(char *URL) +static CURLcode test_lib1521(const char *URL) { CURL *curl = NULL; CURL *dep = NULL; diff --git a/tests/tunit/tool1394.c b/tests/tunit/tool1394.c index 5abb7ad525..77a2021b0a 100644 --- a/tests/tunit/tool1394.c +++ b/tests/tunit/tool1394.c @@ -27,7 +27,7 @@ #include "memdebug.h" /* LAST include file */ -static CURLcode test_tool1394(char *arg) +static CURLcode test_tool1394(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/tunit/tool1604.c b/tests/tunit/tool1604.c index e50a074d96..db7ed14124 100644 --- a/tests/tunit/tool1604.c +++ b/tests/tunit/tool1604.c @@ -58,7 +58,7 @@ static char *getcurlcodestr(int cc) } #endif -static CURLcode test_tool1604(char *arg) +static CURLcode test_tool1604(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/tunit/tool1621.c b/tests/tunit/tool1621.c index 4919988c6c..c7dfedddce 100644 --- a/tests/tunit/tool1621.c +++ b/tests/tunit/tool1621.c @@ -27,7 +27,7 @@ #include "memdebug.h" /* LAST include file */ -static CURLcode test_tool1621(char *arg) +static CURLcode test_tool1621(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/README.md b/tests/unit/README.md index 99465a1ea0..80e2c5c469 100644 --- a/tests/unit/README.md +++ b/tests/unit/README.md @@ -49,7 +49,7 @@ For the actual C file, here's a simple example: #include "a libcurl header.h" /* from the lib dir */ - static CURLcode test_unit9998(char *arg) + static CURLcode test_unit9998(const char *arg) { UNITTEST_BEGIN_SIMPLE @@ -81,7 +81,7 @@ Here's an example using optional initialization and cleanup: /* done before shutting down and exiting */ } - static CURLcode test_unit9999(char *arg) + static CURLcode test_unit9999(const char *arg) { UNITTEST_BEGIN(t9999_setup()) diff --git a/tests/unit/unit1300.c b/tests/unit/unit1300.c index 41b0a3b63b..a5ddf11f49 100644 --- a/tests/unit/unit1300.c +++ b/tests/unit/unit1300.c @@ -33,7 +33,7 @@ static void test_Curl_llist_dtor(void *key, void *value) (void)value; } -static CURLcode test_unit1300(char *arg) +static CURLcode test_unit1300(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1302.c b/tests/unit/unit1302.c index 84e85877bf..54693631ff 100644 --- a/tests/unit/unit1302.c +++ b/tests/unit/unit1302.c @@ -34,7 +34,7 @@ struct etest { size_t olen; }; -static CURLcode test_unit1302(char *arg) +static CURLcode test_unit1302(const char *arg) { UNITTEST_BEGIN_SIMPLE CURLcode rc; diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c index 16334131d3..49ff3e69f2 100644 --- a/tests/unit/unit1303.c +++ b/tests/unit/unit1303.c @@ -65,7 +65,7 @@ static void t1303_stop(struct Curl_easy *easy) * N various values of now */ -static CURLcode test_unit1303(char *arg) +static CURLcode test_unit1303(const char *arg) { struct Curl_easy *easy; diff --git a/tests/unit/unit1304.c b/tests/unit/unit1304.c index 2369ce67bf..250a2ee3f6 100644 --- a/tests/unit/unit1304.c +++ b/tests/unit/unit1304.c @@ -33,7 +33,7 @@ static void t1304_stop(char **password, char **login) Curl_safefree(*login); } -static CURLcode test_unit1304(char *arg) +static CURLcode test_unit1304(const char *arg) { char *login = NULL; char *password = NULL; @@ -178,7 +178,7 @@ static CURLcode test_unit1304(char *arg) #else -static CURLcode test_unit1304(char *arg) +static CURLcode test_unit1304(const char *arg) { UNITTEST_BEGIN_SIMPLE UNITTEST_END_SIMPLE diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index 025b2321be..e95e299453 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -97,7 +97,7 @@ static CURLcode create_node(void) return CURLE_OK; } -static CURLcode test_unit1305(char *arg) +static CURLcode test_unit1305(const char *arg) { UNITTEST_BEGIN(t1305_setup()) diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c index 0265ac30e0..6eb1d4826b 100644 --- a/tests/unit/unit1307.c +++ b/tests/unit/unit1307.c @@ -63,7 +63,7 @@ static const char *ret2name(int i) /* not reached */ } -static CURLcode test_unit1307(char *arg) +static CURLcode test_unit1307(const char *arg) { UNITTEST_BEGIN_SIMPLE @@ -311,7 +311,7 @@ static CURLcode test_unit1307(char *arg) #else -static CURLcode test_unit1307(char *arg) +static CURLcode test_unit1307(const char *arg) { UNITTEST_BEGIN_SIMPLE UNITTEST_END_SIMPLE diff --git a/tests/unit/unit1309.c b/tests/unit/unit1309.c index 07b2cdfbfc..6fac6dbc4b 100644 --- a/tests/unit/unit1309.c +++ b/tests/unit/unit1309.c @@ -56,7 +56,7 @@ static void splayprint(struct Curl_tree *t, int d, char output) splayprint(t->smaller, d + 1, output); } -static CURLcode test_unit1309(char *arg) +static CURLcode test_unit1309(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1323.c b/tests/unit/unit1323.c index 15417fa6d9..f53df89226 100644 --- a/tests/unit/unit1323.c +++ b/tests/unit/unit1323.c @@ -23,7 +23,7 @@ ***************************************************************************/ #include "unitcheck.h" -static CURLcode test_unit1323(char *arg) +static CURLcode test_unit1323(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1330.c b/tests/unit/unit1330.c index 9b03960286..bd7fc6e259 100644 --- a/tests/unit/unit1330.c +++ b/tests/unit/unit1330.c @@ -25,7 +25,7 @@ #include "memdebug.h" -static CURLcode test_unit1330(char *arg) +static CURLcode test_unit1330(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1395.c b/tests/unit/unit1395.c index 28cb1e83a1..e6ac18f081 100644 --- a/tests/unit/unit1395.c +++ b/tests/unit/unit1395.c @@ -25,7 +25,7 @@ #include "memdebug.h" #include "unitprotos.h" -static CURLcode test_unit1395(char *arg) +static CURLcode test_unit1395(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1396.c b/tests/unit/unit1396.c index c56eaacace..aa7ee93375 100644 --- a/tests/unit/unit1396.c +++ b/tests/unit/unit1396.c @@ -37,7 +37,7 @@ static void t1396_stop(CURL *easy) curl_global_cleanup(); } -static CURLcode test_unit1396(char *arg) +static CURLcode test_unit1396(const char *arg) { CURL *easy; diff --git a/tests/unit/unit1397.c b/tests/unit/unit1397.c index 5da11021a7..7d3d4fd7f7 100644 --- a/tests/unit/unit1397.c +++ b/tests/unit/unit1397.c @@ -25,7 +25,7 @@ #include "vtls/hostcheck.h" -static CURLcode test_unit1397(char *arg) +static CURLcode test_unit1397(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1398.c b/tests/unit/unit1398.c index 614bd91b37..fcdd3ec9bf 100644 --- a/tests/unit/unit1398.c +++ b/tests/unit/unit1398.c @@ -28,7 +28,7 @@ #pragma GCC diagnostic ignored "-Wformat" #endif -static CURLcode test_unit1398(char *arg) +static CURLcode test_unit1398(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1399.c b/tests/unit/unit1399.c index 9c3be1c4a6..ca632eb2d6 100644 --- a/tests/unit/unit1399.c +++ b/tests/unit/unit1399.c @@ -71,7 +71,7 @@ static void expect_timer_seconds(struct Curl_easy *data, int seconds) * E.g., if t_starttransfer took 2 seconds initially and took another 1 * second for the redirect request, then the resulting t_starttransfer should * be 3 seconds. */ -static CURLcode test_unit1399(char *arg) +static CURLcode test_unit1399(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1600.c b/tests/unit/unit1600.c index 748e231149..a347203255 100644 --- a/tests/unit/unit1600.c +++ b/tests/unit/unit1600.c @@ -45,7 +45,7 @@ static void t1600_stop(CURL *easy) curl_global_cleanup(); } -static CURLcode test_unit1600(char *arg) +static CURLcode test_unit1600(const char *arg) { CURL *easy; diff --git a/tests/unit/unit1601.c b/tests/unit/unit1601.c index b29d075dab..d31866bb74 100644 --- a/tests/unit/unit1601.c +++ b/tests/unit/unit1601.c @@ -25,7 +25,7 @@ #include "curl_md5.h" -static CURLcode test_unit1601(char *arg) +static CURLcode test_unit1601(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1602.c b/tests/unit/unit1602.c index 996c7f9ae8..e397bdb5ca 100644 --- a/tests/unit/unit1602.c +++ b/tests/unit/unit1602.c @@ -45,7 +45,7 @@ static void t1602_stop(struct Curl_hash *hash) Curl_hash_destroy(hash); } -static CURLcode test_unit1602(char *arg) +static CURLcode test_unit1602(const char *arg) { struct Curl_hash hash; diff --git a/tests/unit/unit1603.c b/tests/unit/unit1603.c index e19b3c2a51..f6e39dc688 100644 --- a/tests/unit/unit1603.c +++ b/tests/unit/unit1603.c @@ -57,7 +57,7 @@ static void t1603_stop(struct Curl_hash *hash_static) Curl_hash_destroy(hash_static); } -static CURLcode test_unit1603(char *arg) +static CURLcode test_unit1603(const char *arg) { struct Curl_hash hash_static; diff --git a/tests/unit/unit1605.c b/tests/unit/unit1605.c index e3ea870dfd..a092ff1639 100644 --- a/tests/unit/unit1605.c +++ b/tests/unit/unit1605.c @@ -44,7 +44,7 @@ static void t1605_stop(CURL *easy) curl_global_cleanup(); } -static CURLcode test_unit1605(char *arg) +static CURLcode test_unit1605(const char *arg) { CURL *easy; diff --git a/tests/unit/unit1606.c b/tests/unit/unit1606.c index 0a42db0396..e39ecaecdc 100644 --- a/tests/unit/unit1606.c +++ b/tests/unit/unit1606.c @@ -76,7 +76,7 @@ static int runawhile(struct Curl_easy *easy, return finaltime; } -static CURLcode test_unit1606(char *arg) +static CURLcode test_unit1606(const char *arg) { struct Curl_easy *easy; diff --git a/tests/unit/unit1607.c b/tests/unit/unit1607.c index a9ba56e325..26d1457df6 100644 --- a/tests/unit/unit1607.c +++ b/tests/unit/unit1607.c @@ -36,7 +36,7 @@ static CURLcode t1607_setup(void) return res; } -static CURLcode test_unit1607(char *arg) +static CURLcode test_unit1607(const char *arg) { /* In builds without IPv6 support CURLOPT_RESOLVE should skip over those addresses, so we have to do that as well. */ diff --git a/tests/unit/unit1608.c b/tests/unit/unit1608.c index 1c8ef3e961..7b5467632c 100644 --- a/tests/unit/unit1608.c +++ b/tests/unit/unit1608.c @@ -42,7 +42,7 @@ static CURLcode t1608_setup(void) return CURLE_OK; } -static CURLcode test_unit1608(char *arg) +static CURLcode test_unit1608(const char *arg) { UNITTEST_BEGIN(t1608_setup()) @@ -74,7 +74,7 @@ static CURLcode test_unit1608(char *arg) #else -static CURLcode test_unit1608(char *arg) +static CURLcode test_unit1608(const char *arg) { UNITTEST_BEGIN_SIMPLE UNITTEST_END_SIMPLE diff --git a/tests/unit/unit1609.c b/tests/unit/unit1609.c index a6bf0e3002..4485c3f046 100644 --- a/tests/unit/unit1609.c +++ b/tests/unit/unit1609.c @@ -68,7 +68,7 @@ Test: expected result: cached address has zero timestamp and new address */ -static CURLcode test_unit1609(char *arg) +static CURLcode test_unit1609(const char *arg) { UNITTEST_BEGIN(t1609_setup()) diff --git a/tests/unit/unit1610.c b/tests/unit/unit1610.c index e008b062b7..73a546a85e 100644 --- a/tests/unit/unit1610.c +++ b/tests/unit/unit1610.c @@ -32,7 +32,7 @@ static CURLcode t1610_setup(void) return res; } -static CURLcode test_unit1610(char *arg) +static CURLcode test_unit1610(const char *arg) { UNITTEST_BEGIN(t1610_setup()) diff --git a/tests/unit/unit1611.c b/tests/unit/unit1611.c index c39334bdd1..5337aa33a3 100644 --- a/tests/unit/unit1611.c +++ b/tests/unit/unit1611.c @@ -25,7 +25,7 @@ #include "curl_md4.h" -static CURLcode test_unit1611(char *arg) +static CURLcode test_unit1611(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1612.c b/tests/unit/unit1612.c index 1bbe31569d..0cc0c02546 100644 --- a/tests/unit/unit1612.c +++ b/tests/unit/unit1612.c @@ -26,7 +26,7 @@ #include "curl_hmac.h" #include "curl_md5.h" -static CURLcode test_unit1612(char *arg) +static CURLcode test_unit1612(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1614.c b/tests/unit/unit1614.c index a6ee3130c2..4ee18df72f 100644 --- a/tests/unit/unit1614.c +++ b/tests/unit/unit1614.c @@ -25,7 +25,7 @@ #include "noproxy.h" -static CURLcode test_unit1614(char *arg) +static CURLcode test_unit1614(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1615.c b/tests/unit/unit1615.c index 48ea21981d..44dc1ae045 100644 --- a/tests/unit/unit1615.c +++ b/tests/unit/unit1615.c @@ -26,7 +26,7 @@ #include "curl_sha512_256.h" -static CURLcode test_unit1615(char *arg) +static CURLcode test_unit1615(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1616.c b/tests/unit/unit1616.c index 10948e2efc..7641cbeace 100644 --- a/tests/unit/unit1616.c +++ b/tests/unit/unit1616.c @@ -45,7 +45,7 @@ static void t1616_stop(struct uint_hash *hash) Curl_uint_hash_destroy(hash); } -static CURLcode test_unit1616(char *arg) +static CURLcode test_unit1616(const char *arg) { struct uint_hash hash; diff --git a/tests/unit/unit1620.c b/tests/unit/unit1620.c index 8521f63b92..14b377b640 100644 --- a/tests/unit/unit1620.c +++ b/tests/unit/unit1620.c @@ -69,7 +69,7 @@ static void t1620_parse( free(options); } -static CURLcode test_unit1620(char *arg) +static CURLcode test_unit1620(const char *arg) { UNITTEST_BEGIN(t1620_setup()) diff --git a/tests/unit/unit1650.c b/tests/unit/unit1650.c index 12c8443e51..89e72262d3 100644 --- a/tests/unit/unit1650.c +++ b/tests/unit/unit1650.c @@ -25,7 +25,7 @@ #include "doh.h" -static CURLcode test_unit1650(char *arg) +static CURLcode test_unit1650(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1651.c b/tests/unit/unit1651.c index b6c37c9b57..5ebce7aabd 100644 --- a/tests/unit/unit1651.c +++ b/tests/unit/unit1651.c @@ -25,7 +25,7 @@ #include "vtls/x509asn1.h" -static CURLcode test_unit1651(char *arg) +static CURLcode test_unit1651(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1652.c b/tests/unit/unit1652.c index 2d79390139..ad3014edca 100644 --- a/tests/unit/unit1652.c +++ b/tests/unit/unit1652.c @@ -82,7 +82,7 @@ static int verify(const char *info, const char *two) return strncmp(info, two, nl - info); } -static CURLcode test_unit1652(char *arg) +static CURLcode test_unit1652(const char *arg) { struct Curl_easy *easy; diff --git a/tests/unit/unit1653.c b/tests/unit/unit1653.c index e203fd9f00..1e6fd9ef26 100644 --- a/tests/unit/unit1653.c +++ b/tests/unit/unit1653.c @@ -41,7 +41,7 @@ static CURLUcode parse_port(CURLU *url, char *h, bool has_scheme) return ret; } -static CURLcode test_unit1653(char *arg) +static CURLcode test_unit1653(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1654.c b/tests/unit/unit1654.c index 4eee6a08dd..4fe2439907 100644 --- a/tests/unit/unit1654.c +++ b/tests/unit/unit1654.c @@ -26,7 +26,7 @@ #include "urldata.h" #include "altsvc.h" -static CURLcode test_unit1654(char *arg) +static CURLcode test_unit1654(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1655.c b/tests/unit/unit1655.c index 55cf8c6c56..a22e087271 100644 --- a/tests/unit/unit1655.c +++ b/tests/unit/unit1655.c @@ -25,7 +25,7 @@ #include "doh.h" /* from the lib dir */ -static CURLcode test_unit1655(char *arg) +static CURLcode test_unit1655(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1656.c b/tests/unit/unit1656.c index 7a41c8d0ee..520a430fe9 100644 --- a/tests/unit/unit1656.c +++ b/tests/unit/unit1656.c @@ -56,7 +56,7 @@ static bool do_test(const struct test_spec *spec, size_t i, return TRUE; } -static CURLcode test_unit1656(char *arg) +static CURLcode test_unit1656(const char *arg) { UNITTEST_BEGIN_SIMPLE @@ -114,7 +114,7 @@ static CURLcode test_unit1656(char *arg) #else -static CURLcode test_unit1656(char *arg) +static CURLcode test_unit1656(const char *arg) { UNITTEST_BEGIN_SIMPLE puts("not tested since Curl_x509_GTime2str() is not built in"); diff --git a/tests/unit/unit1657.c b/tests/unit/unit1657.c index efe5643435..4898d6c139 100644 --- a/tests/unit/unit1657.c +++ b/tests/unit/unit1657.c @@ -85,7 +85,7 @@ static bool do_test1657(const struct test1657_spec *spec, size_t i, return TRUE; } -static CURLcode test_unit1657(char *arg) +static CURLcode test_unit1657(const char *arg) { UNITTEST_BEGIN_SIMPLE @@ -114,7 +114,7 @@ static CURLcode test_unit1657(char *arg) #else -static CURLcode test_unit1657(char *arg) +static CURLcode test_unit1657(const char *arg) { UNITTEST_BEGIN_SIMPLE puts("not tested since Curl_x509_getASN1Element() is not built in"); diff --git a/tests/unit/unit1658.c b/tests/unit/unit1658.c index 9060456fa1..0a6a2e71c1 100644 --- a/tests/unit/unit1658.c +++ b/tests/unit/unit1658.c @@ -114,7 +114,7 @@ static void rrresults(struct Curl_https_rrinfo *rr, CURLcode result) } } -static CURLcode test_unit1658(char *arg) +static CURLcode test_unit1658(const char *arg) { UNITTEST_BEGIN(t1658_setup()) @@ -543,7 +543,7 @@ static CURLcode test_unit1658(char *arg) #else /* CURL_DISABLE_DOH or not HTTPSRR enabled */ -static CURLcode test_unit1658(char *arg) +static CURLcode test_unit1658(const char *arg) { UNITTEST_BEGIN_SIMPLE UNITTEST_END_SIMPLE diff --git a/tests/unit/unit1660.c b/tests/unit/unit1660.c index 5889479721..5c66b1831c 100644 --- a/tests/unit/unit1660.c +++ b/tests/unit/unit1660.c @@ -27,7 +27,7 @@ #include "hsts.h" #if defined(CURL_DISABLE_HTTP) || defined(CURL_DISABLE_HSTS) -static CURLcode test_unit1660(char *arg) +static CURLcode test_unit1660(const char *arg) { UNITTEST_BEGIN_SIMPLE puts("nothing to do when HTTP or HSTS are disabled"); @@ -46,7 +46,7 @@ static void showsts(struct stsentry *e, const char *chost) } } -static CURLcode test_unit1660(char *arg) +static CURLcode test_unit1660(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1661.c b/tests/unit/unit1661.c index 3ae53629c2..446ef51bda 100644 --- a/tests/unit/unit1661.c +++ b/tests/unit/unit1661.c @@ -45,7 +45,7 @@ static void t1661_stop(struct bufref *bufref) Curl_bufref_free(bufref); } -static CURLcode test_unit1661(char *arg) +static CURLcode test_unit1661(const char *arg) { struct bufref bufref; diff --git a/tests/unit/unit1663.c b/tests/unit/unit1663.c index b017965380..0d6fb4bbbe 100644 --- a/tests/unit/unit1663.c +++ b/tests/unit/unit1663.c @@ -72,7 +72,7 @@ static void t1663_parse( free(host); } -static CURLcode test_unit1663(char *arg) +static CURLcode test_unit1663(const char *arg) { UNITTEST_BEGIN(t1663_setup()) diff --git a/tests/unit/unit1664.c b/tests/unit/unit1664.c index d3e7670108..72ae49676b 100644 --- a/tests/unit/unit1664.c +++ b/tests/unit/unit1664.c @@ -39,7 +39,7 @@ static CURLcode t1664_setup(void) return res; } -static CURLcode test_unit1664(char *arg) +static CURLcode test_unit1664(const char *arg) { UNITTEST_BEGIN(t1664_setup()) diff --git a/tests/unit/unit1979.c b/tests/unit/unit1979.c index 48bb24c060..c3925d1bc0 100644 --- a/tests/unit/unit1979.c +++ b/tests/unit/unit1979.c @@ -25,7 +25,7 @@ #include "http_aws_sigv4.h" -static CURLcode test_unit1979(char *arg) +static CURLcode test_unit1979(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit1980.c b/tests/unit/unit1980.c index 347ae2e7dd..9e38d8a678 100644 --- a/tests/unit/unit1980.c +++ b/tests/unit/unit1980.c @@ -25,7 +25,7 @@ #include "http_aws_sigv4.h" -static CURLcode test_unit1980(char *arg) +static CURLcode test_unit1980(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit2600.c b/tests/unit/unit2600.c index 0b664a003f..b5818dd77f 100644 --- a/tests/unit/unit2600.c +++ b/tests/unit/unit2600.c @@ -352,7 +352,7 @@ static void test_connect(CURL *easy, const struct test_case *tc) #define TC_TMOT 90000 /* 90 sec max test duration */ #define CNCT_TMOT 60000 /* 60sec connect timeout */ -static CURLcode test_unit2600(char *arg) +static CURLcode test_unit2600(const char *arg) { CURL *easy; diff --git a/tests/unit/unit2601.c b/tests/unit/unit2601.c index 3dbd9b40fc..aadd69fc12 100644 --- a/tests/unit/unit2601.c +++ b/tests/unit/unit2601.c @@ -205,7 +205,7 @@ static void check_bufq(size_t pool_spares, Curl_bufcp_free(&pool); } -static CURLcode test_unit2601(char *arg) +static CURLcode test_unit2601(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit2602.c b/tests/unit/unit2602.c index 2228d954f7..f031132986 100644 --- a/tests/unit/unit2602.c +++ b/tests/unit/unit2602.c @@ -27,7 +27,7 @@ #include "dynhds.h" #include "curl_trc.h" -static CURLcode test_unit2602(char *arg) +static CURLcode test_unit2602(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit2603.c b/tests/unit/unit2603.c index 060356eecf..5915555f8b 100644 --- a/tests/unit/unit2603.c +++ b/tests/unit/unit2603.c @@ -112,7 +112,7 @@ static void parse_success(const struct tcase *t) } #endif -static CURLcode test_unit2603(char *arg) +static CURLcode test_unit2603(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit2604.c b/tests/unit/unit2604.c index 23730e63c6..80ab407e4b 100644 --- a/tests/unit/unit2604.c +++ b/tests/unit/unit2604.c @@ -25,7 +25,7 @@ #include "vssh/curl_path.h" #include "memdebug.h" -static CURLcode test_unit2604(char *arg) +static CURLcode test_unit2604(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit3200.c b/tests/unit/unit3200.c index ff4e29e18f..023bf0ddb6 100644 --- a/tests/unit/unit3200.c +++ b/tests/unit/unit3200.c @@ -25,7 +25,7 @@ #include "curl_get_line.h" #include "memdebug.h" -static CURLcode test_unit3200(char *arg) +static CURLcode test_unit3200(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit3205.c b/tests/unit/unit3205.c index 13ee8cceab..bb42e9e0c6 100644 --- a/tests/unit/unit3205.c +++ b/tests/unit/unit3205.c @@ -25,7 +25,7 @@ #include "vtls/cipher_suite.h" -static CURLcode test_unit3205(char *arg) +static CURLcode test_unit3205(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit3211.c b/tests/unit/unit3211.c index 444912a21e..c2fac4bbc5 100644 --- a/tests/unit/unit3211.c +++ b/tests/unit/unit3211.c @@ -120,7 +120,7 @@ static void check_set(const char *name, unsigned int capacity, Curl_uint_bset_destroy(&bset); } -static CURLcode test_unit3211(char *arg) +static CURLcode test_unit3211(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit3212.c b/tests/unit/unit3212.c index 7386aad0e7..261d294528 100644 --- a/tests/unit/unit3212.c +++ b/tests/unit/unit3212.c @@ -41,7 +41,7 @@ static void t3212_stop(struct uint_tbl *tbl) Curl_uint_tbl_destroy(tbl); } -static CURLcode test_unit3212(char *arg) +static CURLcode test_unit3212(const char *arg) { struct uint_tbl tbl; int dummy; diff --git a/tests/unit/unit3213.c b/tests/unit/unit3213.c index 7ecdfb2664..850b275c86 100644 --- a/tests/unit/unit3213.c +++ b/tests/unit/unit3213.c @@ -90,7 +90,7 @@ static void check_spbset(const char *name, const unsigned int *s, size_t slen) Curl_uint_spbset_destroy(&bset); } -static CURLcode test_unit3213(char *arg) +static CURLcode test_unit3213(const char *arg) { UNITTEST_BEGIN_SIMPLE diff --git a/tests/unit/unit3214.c b/tests/unit/unit3214.c index fa65b06c58..34549fc296 100644 --- a/tests/unit/unit3214.c +++ b/tests/unit/unit3214.c @@ -56,7 +56,7 @@ static void checksize(const char *name, size_t size, size_t allowed) #define MAX_CURLMSG 24 #define MAX_CURL_HEADER 48 -static CURLcode test_unit3214(char *arg) +static CURLcode test_unit3214(const char *arg) { UNITTEST_BEGIN_SIMPLE -- 2.47.2