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/unit/unit1303.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/unit/unit1303.c') diff --git a/tests/unit/unit1303.c b/tests/unit/unit1303.c index 75a8e59c2..b065683a6 100644 --- a/tests/unit/unit1303.c +++ b/tests/unit/unit1303.c @@ -75,7 +75,6 @@ struct timetest { UNITTEST_START { struct curltime now; - time_t timeout; unsigned int i; const struct timetest run[] = { @@ -139,6 +138,7 @@ UNITTEST_START data->progress.t_startop.tv_usec = 0; for(i = 0; i < sizeof(run)/sizeof(run[0]); i++) { + time_t timeout; NOW(run[i].now_s, run[i].now_us); TIMEOUTS(run[i].timeout_ms, run[i].connecttimeout_ms); timeout = Curl_timeleft(data, &now, run[i].connecting); -- cgit v1.2.3