From 7833270ca02c0d10c0c4a9fc0aeb8615e8e63038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zsolt=20Borb=C3=A9ly?= Date: Thu, 18 May 2017 15:20:44 +0200 Subject: [PATCH] Initialize an array in test-ext-arg.c (#1824) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In case of some compilers (e.g. gcc-4.9, gcc-5.4) the `TEST_ASSERT (arg3[4] == '\0')` fails in test_validator1_handler() due to uninitialized memory fields. JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com --- tests/unit-ext/test-ext-arg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-ext/test-ext-arg.c b/tests/unit-ext/test-ext-arg.c index b0d20015f..993131edf 100644 --- a/tests/unit-ext/test-ext-arg.c +++ b/tests/unit-ext/test-ext-arg.c @@ -86,7 +86,7 @@ test_validator1_handler (const jerry_value_t func_obj_val __attribute__((unused) bool arg1; double arg2 = 0.0; - char arg3[5]; + char arg3[5] = { 0 }; jerry_value_t arg4 = jerry_create_undefined (); jerryx_arg_t mapping[] =