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 --- src/tool_urlglob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tool_urlglob.c') diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 6fae23620..fc8c2f529 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -622,12 +622,12 @@ CURLcode glob_match_url(char **result, char *filename, URLGlob *glob) while(*filename) { if(*filename == '#' && ISDIGIT(filename[1])) { - unsigned long i; char *ptr = filename; unsigned long num = strtoul(&filename[1], &filename, 10); URLPattern *pat = NULL; if(num < glob->size) { + unsigned long i; num--; /* make it zero based */ /* find the correct glob entry */ for(i = 0; isize; i++) { -- cgit v1.2.3