summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tests/hs_process_table_tests.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/tests/hs_process_table_tests.c b/src/tests/hs_process_table_tests.c
index 04fc9e4..fc13b37 100644
--- a/src/tests/hs_process_table_tests.c
+++ b/src/tests/hs_process_table_tests.c
@@ -352,7 +352,11 @@ TEST(process_four_bools)
lua_pushboolean(L, true);
lua_setfield(L, -2, "b4");
- bool b1, b2, b3, b4;
+ bool b1 = false;
+ bool b2 = true;
+ bool b3 = true;
+ bool b4 = false;
+
hs_process_table(L, -1,
"b1", HS_BOOL, hs_pt_set_boolean, &b1,
"b2", HS_BOOL, hs_pt_set_boolean, &b2,
@@ -382,7 +386,11 @@ TEST(process_four_ints)
lua_pushinteger(L, 4);
lua_setfield(L, -2, "j4");
- int j1, j2, j3, j4;
+ lua_Integer j1 = 0;
+ lua_Integer j2 = 0;
+ lua_Integer j3 = 0;
+ lua_Integer j4 = 0;
+
hs_process_table(L, -1,
"j1", HS_INT, hs_pt_set_integer, &j1,
"j2", HS_INT, hs_pt_set_integer, &j2,
@@ -412,7 +420,11 @@ TEST(process_four_numbers)
lua_pushnumber(L, 4.669);
lua_setfield(L, -2, "n4");
- lua_Number n1, n2, n3, n4;
+ lua_Number n1 = 0;
+ lua_Number n2 = 0;
+ lua_Number n3 = 0;
+ lua_Number n4 = 0;
+
hs_process_table(L, -1,
"n1", HS_NUM, hs_pt_set_number, &n1,
"n2", HS_NUM, hs_pt_set_number, &n2,
@@ -442,7 +454,11 @@ TEST(process_four_strings)
lua_pushstring(L, "Having attained that Abiding joy beyond the senses, Revealed in the stilled mind, He never swerves from the eternal truth.");
lua_setfield(L, -2, "s4");
- const char *s1, *s2, *s3, *s4;
+ const char *s1 = "";
+ const char *s2 = "";
+ const char *s3 = "";
+ const char *s4 = "";
+
hs_process_table(L, -1,
"s1", HS_STR, hs_pt_set_string, &s1,
"s2", HS_STR, hs_pt_set_string, &s2,