mirror of
https://github.com/curl/curl.git
synced 2026-08-04 17:26:18 +03:00
examples: fix build issues in 'complicated' examples
- cacertinmem: build cleanly with BoringSSL/AWS-LC.
- cacertinmem: silence `-Wcast-function-type-strict`.
- multi-uv: fix callback prototypes.
- multithread, threaded-ssl: do not pass const as thread arg.
- sessioninfo: fix suppressing deprecated feature warning.
- usercertinmem: sync formatting with cacertinmem.
Follow-up to 4a6bdd5899 #18908
Cherry-picked from #18909
Closes #18914
This commit is contained in:
parent
53be8166b2
commit
6bb7714032
6 changed files with 36 additions and 24 deletions
|
|
@ -48,12 +48,13 @@ static const char * const urls[NUMT]= {
|
|||
"www.example"
|
||||
};
|
||||
|
||||
static void *pull_one_url(void *url)
|
||||
static void *pull_one_url(void *pindex)
|
||||
{
|
||||
int i = *(int *)pindex;
|
||||
CURL *curl;
|
||||
|
||||
curl = curl_easy_init();
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, urls[i]);
|
||||
curl_easy_perform(curl); /* ignores error */
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ int main(void)
|
|||
int error = pthread_create(&tid[i],
|
||||
NULL, /* default attributes please */
|
||||
pull_one_url,
|
||||
(void *)urls[i]);
|
||||
(void *)&i);
|
||||
if(error)
|
||||
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue