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_msgs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tool_msgs.c') diff --git a/src/tool_msgs.c b/src/tool_msgs.c index 91d62ec1e..9cce8063e 100644 --- a/src/tool_msgs.c +++ b/src/tool_msgs.c @@ -109,8 +109,8 @@ void warnf(struct GlobalConfig *config, const char *fmt, ...) void helpf(FILE *errors, const char *fmt, ...) { - va_list ap; if(fmt) { + va_list ap; va_start(ap, fmt); fputs("curl: ", errors); /* prefix it */ vfprintf(errors, fmt, ap); -- cgit v1.2.3