aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib512.c
diff options
context:
space:
mode:
authorMarian Klymov <nekto1989@gmail.com>2018-06-02 23:52:56 +0300
committerDaniel Stenberg <daniel@haxx.se>2018-06-11 11:14:48 +0200
commitc45360d4633850839bb9c2d77dbf8a8285e9ad49 (patch)
tree20159c553a74ed98c2431fc8f2852067f79ac4e9 /tests/libtest/lib512.c
parent38203f1585da53e07e54e37c7d5da4d72f509a2e (diff)
cppcheck: fix warnings
- Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
Diffstat (limited to 'tests/libtest/lib512.c')
-rw-r--r--tests/libtest/lib512.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/libtest/lib512.c b/tests/libtest/lib512.c
index 14241dd02..0c83ddd53 100644
--- a/tests/libtest/lib512.c
+++ b/tests/libtest/lib512.c
@@ -29,15 +29,13 @@
int test(char *URL)
{
CURLcode code;
- CURL *curl;
- CURL *curl2;
int rc = 99;
code = curl_global_init(CURL_GLOBAL_ALL);
if(code == CURLE_OK) {
-
- curl = curl_easy_init();
+ CURL *curl = curl_easy_init();
if(curl) {
+ CURL *curl2;
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_HEADER, 1L);