From c6825b7a6b5e8798bc861b3d280430e8149e7298 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 20 Mar 2012 18:28:24 +0100 Subject: fix several compiler warnings --- tests/libtest/testtrace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/libtest/testtrace.c b/tests/libtest/testtrace.c index 5cb5fec5e..b13c54e30 100644 --- a/tests/libtest/testtrace.c +++ b/tests/libtest/testtrace.c @@ -91,11 +91,13 @@ int libtest_debug_cb(CURL *handle, curl_infotype type, struct timeval tv; struct tm *now; char timebuf[20]; + char *timestr; time_t secs; (void)handle; timebuf[0] = '\0'; + timestr = &timebuf[0]; if(trace_cfg->tracetime) { tv = tutil_tvnow(); @@ -111,7 +113,7 @@ int libtest_debug_cb(CURL *handle, curl_infotype type, switch (type) { case CURLINFO_TEXT: - fprintf(stderr, "%s== Info: %s", &timebuf[0], data); + fprintf(stderr, "%s== Info: %s", timestr, data); default: /* in case a new one is introduced to shock us */ return 0; -- cgit v1.2.3