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/unit1307.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/unit/unit1307.c') diff --git a/tests/unit/unit1307.c b/tests/unit/unit1307.c index 22afa4bf2..d6664ff69 100644 --- a/tests/unit/unit1307.c +++ b/tests/unit/unit1307.c @@ -272,7 +272,7 @@ enum system { UNITTEST_START { int testnum = sizeof(tests) / sizeof(struct testcase); - int i, rc; + int i; enum system machine; #ifdef HAVE_FNMATCH @@ -290,7 +290,7 @@ UNITTEST_START for(i = 0; i < testnum; i++) { int result = tests[i].result; - rc = Curl_fnmatch(NULL, tests[i].pattern, tests[i].string); + int rc = Curl_fnmatch(NULL, tests[i].pattern, tests[i].string); if(result & (LINUX_DIFFER|MAC_DIFFER)) { if((result & LINUX_DIFFER) && (machine == SYSTEM_LINUX)) result >>= LINUX_SHIFT; -- cgit v1.2.3