aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/testtrace.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/testtrace.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/testtrace.c')
-rw-r--r--tests/libtest/testtrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c
index 63e022b33..3f9eedd80 100644
--- a/tests/libtest/testtrace.c
+++ b/tests/libtest/testtrace.c
@@ -90,7 +90,6 @@ int libtest_debug_cb(CURL *handle, curl_infotype type,
struct libtest_trace_cfg *trace_cfg = userp;
const char *text;
struct timeval tv;
- struct tm *now;
char timebuf[20];
char *timestr;
time_t secs;
@@ -101,6 +100,7 @@ int libtest_debug_cb(CURL *handle, curl_infotype type,
timestr = &timebuf[0];
if(trace_cfg->tracetime) {
+ struct tm *now;
tv = tutil_tvnow();
if(!known_offset) {
epoch_offset = time(NULL) - tv.tv_sec;