mirror of
https://github.com/curl/curl.git
synced 2026-08-25 07:33:36 +03:00
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
This commit is contained in:
parent
38203f1585
commit
c45360d463
61 changed files with 213 additions and 273 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue