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 --- lib/sendf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sendf.c') diff --git a/lib/sendf.c b/lib/sendf.c index 27c0ccc73..a0d9a1d4d 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -841,7 +841,6 @@ int Curl_debug(struct Curl_easy *data, curl_infotype type, { int rc; if(data->set.printhost && conn && conn->host.dispname) { - char buffer[160]; const char *t = NULL; const char *w = "Data"; switch(type) { @@ -862,6 +861,7 @@ int Curl_debug(struct Curl_easy *data, curl_infotype type, } if(t) { + char buffer[160]; snprintf(buffer, sizeof(buffer), "[%s %s %s]", w, t, conn->host.dispname); rc = showit(data, CURLINFO_TEXT, buffer, strlen(buffer)); -- cgit v1.2.3