mirror of
https://github.com/curl/curl.git
synced 2026-08-26 01:13:37 +03:00
examples: remove unused variables
Fixes Codacy/CppCheck warnings. Closes
This commit is contained in:
parent
528b284e4b
commit
b069815a7a
12 changed files with 26 additions and 35 deletions
|
|
@ -69,16 +69,15 @@ int main(int argc, char **argv)
|
|||
{
|
||||
pthread_t tid[NUMT];
|
||||
int i;
|
||||
int error;
|
||||
|
||||
/* Must initialize libcurl before any threads are started */
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
for(i = 0; i< NUMT; i++) {
|
||||
error = pthread_create(&tid[i],
|
||||
NULL, /* default attributes please */
|
||||
pull_one_url,
|
||||
(void *)urls[i]);
|
||||
int error = pthread_create(&tid[i],
|
||||
NULL, /* default attributes please */
|
||||
pull_one_url,
|
||||
(void *)urls[i]);
|
||||
if(0 != error)
|
||||
fprintf(stderr, "Couldn't run thread number %d, errno %d\n", i, error);
|
||||
else
|
||||
|
|
@ -87,7 +86,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/* now wait for all threads to terminate */
|
||||
for(i = 0; i< NUMT; i++) {
|
||||
error = pthread_join(tid[i], NULL);
|
||||
pthread_join(tid[i], NULL);
|
||||
fprintf(stderr, "Thread %d terminated\n", i);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue