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/libtest/lib579.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/libtest/lib579.c') diff --git a/tests/libtest/lib579.c b/tests/libtest/lib579.c index cba4b1cb4..4977a03cb 100644 --- a/tests/libtest/lib579.c +++ b/tests/libtest/lib579.c @@ -39,7 +39,6 @@ struct WriteThis { static int progress_callback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) { - FILE *moo; static int prev_ultotal = -1; static int prev_ulnow = -1; (void)clientp; /* UNUSED */ @@ -53,7 +52,7 @@ static int progress_callback(void *clientp, double dltotal, double dlnow, if((prev_ultotal != (int)ultotal) || (prev_ulnow != (int)ulnow)) { - moo = fopen(libtest_arg2, "ab"); + FILE *moo = fopen(libtest_arg2, "ab"); if(moo) { fprintf(moo, "Progress callback called with UL %d out of %d\n", (int)ulnow, (int)ultotal); -- cgit v1.2.3