From 3f322f1a1a1ce2fc1354699f11ac483d7a3cd5fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 2 Feb 2019 08:09:55 -0500 Subject: [PATCH 1/1] Test fix: passing bool argument to va_start is undefined MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit clang warns that "passing an object that undergoes default argument promotion to 'va_start' has undefined behaviour [-Wvarargs]". Since va_start's last argument has no known type, the boolean argument is promoted to 'int', which is not guaranteed to have the same size as 'bool'. Signed-off-by: Jérémie Galarneau --- tests/unit/test_string_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_string_utils.c b/tests/unit/test_string_utils.c index 9596af83e..c60168a9e 100644 --- a/tests/unit/test_string_utils.c +++ b/tests/unit/test_string_utils.c @@ -26,7 +26,7 @@ /* Number of TAP tests in this file */ #define NUM_TESTS 69 -static void test_one_split(const char *input, char delim, bool escape_delim, +static void test_one_split(const char *input, char delim, int escape_delim, ...) { va_list vl; -- 2.34.1