[PATCH 3/5] cppcheck: call va_end in _internal_error

Subject: [PATCH 3/5] cppcheck: call va_end in _internal_error

Date: Sat, 26 Aug 2017 11:41:39 -0300

To: notmuch@notmuchmail.org, notmuch@freelists.org

Cc: David Bremner

From: David Bremner


fix for:
    util/error_util.c:38: error: va_list 'va_args' was opened but not
    closed by va_end()

This makes the code more copy-pastable, if nothing else
---
 util/error_util.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/util/error_util.c b/util/error_util.c
index 778bbd52..e64162c7 100644
--- a/util/error_util.c
+++ b/util/error_util.c
@@ -34,6 +34,7 @@ _internal_error (const char *format, ...)
     fprintf (stderr, "Internal error: ");
     vfprintf (stderr, format, va_args);
 
+    va_end (va_args);
     exit (1);
 }
 
-- 
2.14.1



Thread: