From d69733154a2b411c4248a3f90e582115a8512276 Mon Sep 17 00:00:00 2001 From: Colin Leroy-Mira Date: Mon, 18 Mar 2024 19:42:22 +0100 Subject: Fix valgrind warning on aarch64/glibc 2.31 tests/mantest were failing on Raspberry Pi OS 11: ==10205== Conditional jump or move depends on uninitialised value(s) ==10205== at 0x48806F8: checkfail (jq_test.c:58) ==10205== by 0x48806F8: run_jq_tests (jq_test.c:99) ==10205== by 0x4880FCB: jq_testsuite (jq_test.c:39) ==10205== by 0x10B37F: main (main.c:576) ==10205== ==10205== Conditional jump or move depends on uninitialised value(s) ==10205== at 0x4880714: checkfail (jq_test.c:58) ==10205== by 0x4880714: run_jq_tests (jq_test.c:99) ==10205== by 0x4880FCB: jq_testsuite (jq_test.c:39) ==10205== by 0x10B37F: main (main.c:576) --- src/jq_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jq_test.c b/src/jq_test.c index 39456861..568889d0 100644 --- a/src/jq_test.c +++ b/src/jq_test.c @@ -74,7 +74,7 @@ static void test_err_cb(void *data, jv e) { } static void run_jq_tests(jv lib_dirs, int verbose, FILE *testdata, int skip, int take) { - char prog[4096]; + char prog[4096] = {0}; char buf[4096]; struct err_data err_msg; int tests = 0, passed = 0, invalid = 0; -- cgit v1.2.3