From c45360d4633850839bb9c2d77dbf8a8285e9ad49 Mon Sep 17 00:00:00 2001 From: Marian Klymov Date: Sat, 2 Jun 2018 23:52:56 +0300 Subject: 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 --- tests/libtest/lib512.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/libtest/lib512.c') 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); -- cgit v1.2.3