diff --git a/config.subr b/config.subr
index fbb90b2..34147b5 100644
--- a/config.subr
+++ b/config.subr
@@ -771,6 +771,15 @@ if ${HAVE_GCOV}; then
echo "GCOV = $GCOV" >> ${CONFIG_MK}
fi
+if [ "x$GDB" = "x" ]; then
+ if which egdb >/dev/null 2>&1; then
+ GDB=egdb
+ else
+ GDB=gdb
+ fi
+fi
+echo "GDB = $GDB" >> ${CONFIG_MK}
+
if [ "x$GMAKE" = "x" ]; then
if which gmake >/dev/null 2>&1; then
GMAKE=gmake
diff --git a/lib/kc3/0.1/buf_rw.kc3 b/lib/kc3/0.1/buf_rw.kc3
index b7f76c6..9faea82 100644
--- a/lib/kc3/0.1/buf_rw.kc3
+++ b/lib/kc3/0.1/buf_rw.kc3
@@ -3,4 +3,6 @@ defmodule BufRW do
defstruct [r: %Buf{},
w: %Buf{}]
+ def init_alloc = cfn BufRW "buf_rw_init_alloc" (Result, Uw)
+
end
diff --git a/libkc3/buf_parse.c b/libkc3/buf_parse.c
index da5be7a..ad2d11a 100644
--- a/libkc3/buf_parse.c
+++ b/libkc3/buf_parse.c
@@ -128,7 +128,7 @@ sw buf_parse_array_data (s_buf *buf, s_array *dest)
if ((r = buf_parse_array_data_rec(buf, &tmp, address, &tag,
0)) <= 0) {
err_write_1("buf_parse_array_data: buf_parse_array_data_rec: ");
- err_inspect_sw(&r);
+ err_inspect_sw_decimal(&r);
err_write_1("\n");
goto restore;
}
@@ -303,7 +303,7 @@ sw buf_parse_array_dimensions (s_buf *buf, s_array *dest)
0)) < 0) {
err_write_1("buf_parse_array_dimensions:"
" buf_parse_array_dimensions_rec: ");
- err_inspect_sw(&r);
+ err_inspect_sw_decimal(&r);
err_write_1("\n");
goto clean;
}
@@ -519,7 +519,7 @@ sw buf_parse_block_inner (s_buf *buf, bool short_form, s_block *block)
goto ok;
if ((r = buf_read_1(buf, "\n")) < 0) {
err_write_1("buf_parse_block_inner: line ");
- err_inspect_sw(&buf->line);
+ err_inspect_sw_decimal(&buf->line);
err_puts(": missing separator: ");
err_inspect_buf(buf);
err_write_1("\n");
@@ -529,7 +529,7 @@ sw buf_parse_block_inner (s_buf *buf, bool short_form, s_block *block)
if (! r) {
if ((r = buf_read_1(buf, ";")) <= 0) {
err_write_1("buf_parse_block_inner: line ");
- err_inspect_sw(&buf->line);
+ err_inspect_sw_decimal(&buf->line);
err_puts(": missing separator: ");
err_inspect_buf(buf);
err_write_1("\n");
@@ -1407,7 +1407,7 @@ sw buf_parse_digit (s_buf *buf, const s_str *base, u8 *dest)
if ((digit = str_character_position(base, c)) >= 0) {
if (digit > 255) {
err_write_1("buf_parse_digit: digit overflow: ");
- err_inspect_sw(&digit);
+ err_inspect_sw_decimal(&digit);
err_write_1("\n");
assert(! "buf_parse_digit: digit overflow");
return -1;
@@ -2509,93 +2509,93 @@ sw buf_parse_list (s_buf *buf, s_list **list)
sw buf_parse_list_paren (s_buf *buf, s_list **list)
{
- u8 b;
s_list **i;
sw r;
sw result = 0;
+ s_buf_save save;
i = list;
+ buf_save_init(buf, &save);
if ((r = buf_read_1(buf, "(")) <= 0)
- return r;
+ goto clean;
result += r;
if ((r = buf_parse_comments(buf)) < 0)
- return r;
+ goto restore;
result += r;
if ((r = buf_ignore_spaces(buf)) < 0)
- return r;
+ goto restore;
result += r;
if ((r = buf_read_1(buf, ")")) < 0)
- return r;
+ goto restore;
if (r > 0) {
result += r;
*list = NULL;
- return result;
+ r = result;
+ goto clean;
}
*i = NULL;
while (1) {
*i = list_new(NULL);
if ((r = buf_parse_tag(buf, &(*i)->tag)) <= 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_parse_comments(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_ignore_spaces(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_read_1(buf, ")")) < 0)
- goto eat_and_clean;
+ goto restore;
if (r > 0) {
result += r;
- return result;
+ r = result;
+ goto clean;
}
if ((r = buf_read_1(buf, ",")) < 0)
- goto eat_and_clean;
+ goto restore;
if (r > 0) {
result += r;
i = &(*i)->next.data.list;
if ((r = buf_parse_comments(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_ignore_spaces(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
continue;
}
if ((r = buf_read_1(buf, "|")) < 0)
- goto eat_and_clean;
+ goto restore;
if (r > 0) {
result += r;
if ((r = buf_parse_comments(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_ignore_spaces(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_parse_tag(buf, &(*i)->next)) <= 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_parse_comments(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_ignore_spaces(buf)) < 0)
- goto eat_and_clean;
+ goto restore;
result += r;
if ((r = buf_read_1(buf, ")")) <= 0)
- goto eat_and_clean;
+ goto restore;
result += r;
r = result;
goto clean;
}
- goto eat_and_clean;
+ goto restore;
}
- eat_and_clean:
- while (1)
- if ((r = buf_read_u8(buf, &b)) < 0 ||
- (r && b == ')') ||
- ! r)
- goto clean;
- clean:
+ restore:
list_delete_all(*list);
+ buf_save_restore_rpos(buf, &save);
+ clean:
+ buf_save_clean(buf, &save);
return r;
}
diff --git a/libkc3/io.c b/libkc3/io.c
index cf493c4..ba1cb4d 100644
--- a/libkc3/io.c
+++ b/libkc3/io.c
@@ -12,6 +12,16 @@
*/
#include "buf.h"
#include "buf_inspect.h"
+#include "buf_inspect_s8_decimal.h"
+#include "buf_inspect_s16_decimal.h"
+#include "buf_inspect_s32_decimal.h"
+#include "buf_inspect_s64_decimal.h"
+#include "buf_inspect_sw_decimal.h"
+#include "buf_inspect_u8_decimal.h"
+#include "buf_inspect_u16_decimal.h"
+#include "buf_inspect_u32_decimal.h"
+#include "buf_inspect_u64_decimal.h"
+#include "buf_inspect_uw_decimal.h"
#include "env.h"
#include "io.h"
#include "tag_type.h"
@@ -171,28 +181,38 @@ sw io_write_str (const s_str *x)
return r;
}
-DEF_ERR_IO_INSPECT(array, const s_array *)
-DEF_ERR_IO_INSPECT(call, const s_call *)
-DEF_ERR_IO_INSPECT(character, const character *)
-DEF_ERR_IO_INSPECT(f32, const f32 *)
-DEF_ERR_IO_INSPECT(fact, const s_fact *)
-DEF_ERR_IO_INSPECT(fn_pattern, const s_list *)
-DEF_ERR_IO_INSPECT(ident, const s_ident *)
-DEF_ERR_IO_INSPECT(list, const s_list * const *)
-DEF_ERR_IO_INSPECT(map, const s_map *)
-DEF_ERR_IO_INSPECT(pointer, const void *)
-DEF_ERR_IO_INSPECT(ptr, const u_ptr_w *)
-DEF_ERR_IO_INSPECT(s8, const s8 *)
-DEF_ERR_IO_INSPECT(s16, const s16 *)
-DEF_ERR_IO_INSPECT(s32, const s32 *)
-DEF_ERR_IO_INSPECT(s64, const s64 *)
-DEF_ERR_IO_INSPECT(str, const s_str *)
-DEF_ERR_IO_INSPECT(sw, const sw *)
-DEF_ERR_IO_INSPECT(sym, const s_sym * const *)
-DEF_ERR_IO_INSPECT(tag, const s_tag *)
-DEF_ERR_IO_INSPECT(tuple, const s_tuple *)
-DEF_ERR_IO_INSPECT(u8, const u8 *)
-DEF_ERR_IO_INSPECT(u16, const u16 *)
-DEF_ERR_IO_INSPECT(u32, const u32 *)
-DEF_ERR_IO_INSPECT(u64, const u64 *)
-DEF_ERR_IO_INSPECT(uw, const uw *)
+DEF_ERR_IO_INSPECT(array, const s_array *)
+DEF_ERR_IO_INSPECT(call, const s_call *)
+DEF_ERR_IO_INSPECT(character, const character *)
+DEF_ERR_IO_INSPECT(f32, const f32 *)
+DEF_ERR_IO_INSPECT(fact, const s_fact *)
+DEF_ERR_IO_INSPECT(fn_pattern, const s_list *)
+DEF_ERR_IO_INSPECT(ident, const s_ident *)
+DEF_ERR_IO_INSPECT(list, const s_list * const *)
+DEF_ERR_IO_INSPECT(map, const s_map *)
+DEF_ERR_IO_INSPECT(pointer, const void *)
+DEF_ERR_IO_INSPECT(ptr, const u_ptr_w *)
+DEF_ERR_IO_INSPECT(s8, const s8 *)
+DEF_ERR_IO_INSPECT(s8_decimal, const s8 *)
+DEF_ERR_IO_INSPECT(s16, const s16 *)
+DEF_ERR_IO_INSPECT(s16_decimal, const s16 *)
+DEF_ERR_IO_INSPECT(s32, const s32 *)
+DEF_ERR_IO_INSPECT(s32_decimal, const s32 *)
+DEF_ERR_IO_INSPECT(s64, const s64 *)
+DEF_ERR_IO_INSPECT(s64_decimal, const s64 *)
+DEF_ERR_IO_INSPECT(str, const s_str *)
+DEF_ERR_IO_INSPECT(sw, const sw *)
+DEF_ERR_IO_INSPECT(sw_decimal, const sw *)
+DEF_ERR_IO_INSPECT(sym, const s_sym * const *)
+DEF_ERR_IO_INSPECT(tag, const s_tag *)
+DEF_ERR_IO_INSPECT(tuple, const s_tuple *)
+DEF_ERR_IO_INSPECT(u8, const u8 *)
+DEF_ERR_IO_INSPECT(u8_decimal, const u8 *)
+DEF_ERR_IO_INSPECT(u16, const u16 *)
+DEF_ERR_IO_INSPECT(u16_decimal, const u16 *)
+DEF_ERR_IO_INSPECT(u32, const u32 *)
+DEF_ERR_IO_INSPECT(u32_decimal, const u32 *)
+DEF_ERR_IO_INSPECT(u64, const u64 *)
+DEF_ERR_IO_INSPECT(u64_decimal, const u64 *)
+DEF_ERR_IO_INSPECT(uw, const uw *)
+DEF_ERR_IO_INSPECT(uw_decimal, const uw *)
diff --git a/libkc3/io.h b/libkc3/io.h
index 5b7c922..db051b5 100644
--- a/libkc3/io.h
+++ b/libkc3/io.h
@@ -41,38 +41,48 @@ sw io_write (const void *x, uw len);
sw io_write_1 (const char *x);
sw io_write_str (const s_str *x);
-PROTOTYPES_ERR_IO_INSPECT(array, const s_array *);
-PROTOTYPES_ERR_IO_INSPECT(bool, const bool *);
-PROTOTYPES_ERR_IO_INSPECT(buf, const s_buf *);
-PROTOTYPES_ERR_IO_INSPECT(call, const s_call *);
-PROTOTYPES_ERR_IO_INSPECT(cfn, const s_cfn *);
-PROTOTYPES_ERR_IO_INSPECT(character, const character *);
-PROTOTYPES_ERR_IO_INSPECT(f32, const f32 *);
-PROTOTYPES_ERR_IO_INSPECT(f64, const f64 *);
-PROTOTYPES_ERR_IO_INSPECT(fact, const s_fact *);
-PROTOTYPES_ERR_IO_INSPECT(facts_spec, const p_facts_spec);
-PROTOTYPES_ERR_IO_INSPECT(fn, const s_fn *);
-PROTOTYPES_ERR_IO_INSPECT(fn_pattern, const s_list *);
-PROTOTYPES_ERR_IO_INSPECT(ident, const s_ident *);
-PROTOTYPES_ERR_IO_INSPECT(integer, const s_integer *);
-PROTOTYPES_ERR_IO_INSPECT(list, const s_list * const *);
-PROTOTYPES_ERR_IO_INSPECT(map, const s_map *);
-PROTOTYPES_ERR_IO_INSPECT(pointer, const void *);
-PROTOTYPES_ERR_IO_INSPECT(ptr, const u_ptr_w *);
-PROTOTYPES_ERR_IO_INSPECT(s8, const s8 *);
-PROTOTYPES_ERR_IO_INSPECT(s16, const s16 *);
-PROTOTYPES_ERR_IO_INSPECT(s32, const s32 *);
-PROTOTYPES_ERR_IO_INSPECT(s64, const s64 *);
-PROTOTYPES_ERR_IO_INSPECT(str, const s_str *);
-PROTOTYPES_ERR_IO_INSPECT(sw, const sw *);
-PROTOTYPES_ERR_IO_INSPECT(sym, const s_sym * const *);
-PROTOTYPES_ERR_IO_INSPECT(tag, const s_tag *);
-PROTOTYPES_ERR_IO_INSPECT(tag_type, e_tag_type);
-PROTOTYPES_ERR_IO_INSPECT(tuple, const s_tuple *);
-PROTOTYPES_ERR_IO_INSPECT(u8, const u8 *);
-PROTOTYPES_ERR_IO_INSPECT(u16, const u16 *);
-PROTOTYPES_ERR_IO_INSPECT(u32, const u32 *);
-PROTOTYPES_ERR_IO_INSPECT(u64, const u64 *);
-PROTOTYPES_ERR_IO_INSPECT(uw, const uw *);
+PROTOTYPES_ERR_IO_INSPECT(array, const s_array *);
+PROTOTYPES_ERR_IO_INSPECT(bool, const bool *);
+PROTOTYPES_ERR_IO_INSPECT(buf, const s_buf *);
+PROTOTYPES_ERR_IO_INSPECT(call, const s_call *);
+PROTOTYPES_ERR_IO_INSPECT(cfn, const s_cfn *);
+PROTOTYPES_ERR_IO_INSPECT(character, const character *);
+PROTOTYPES_ERR_IO_INSPECT(f32, const f32 *);
+PROTOTYPES_ERR_IO_INSPECT(f64, const f64 *);
+PROTOTYPES_ERR_IO_INSPECT(fact, const s_fact *);
+PROTOTYPES_ERR_IO_INSPECT(facts_spec, const p_facts_spec);
+PROTOTYPES_ERR_IO_INSPECT(fn, const s_fn *);
+PROTOTYPES_ERR_IO_INSPECT(fn_pattern, const s_list *);
+PROTOTYPES_ERR_IO_INSPECT(ident, const s_ident *);
+PROTOTYPES_ERR_IO_INSPECT(integer, const s_integer *);
+PROTOTYPES_ERR_IO_INSPECT(list, const s_list * const *);
+PROTOTYPES_ERR_IO_INSPECT(map, const s_map *);
+PROTOTYPES_ERR_IO_INSPECT(pointer, const void *);
+PROTOTYPES_ERR_IO_INSPECT(ptr, const u_ptr_w *);
+PROTOTYPES_ERR_IO_INSPECT(s8, const s8 *);
+PROTOTYPES_ERR_IO_INSPECT(s8_decimal, const s8 *);
+PROTOTYPES_ERR_IO_INSPECT(s16, const s16 *);
+PROTOTYPES_ERR_IO_INSPECT(s16_decimal, const s16 *);
+PROTOTYPES_ERR_IO_INSPECT(s32, const s32 *);
+PROTOTYPES_ERR_IO_INSPECT(s32_decimal, const s32 *);
+PROTOTYPES_ERR_IO_INSPECT(s64, const s64 *);
+PROTOTYPES_ERR_IO_INSPECT(s64_decimal, const s64 *);
+PROTOTYPES_ERR_IO_INSPECT(str, const s_str *);
+PROTOTYPES_ERR_IO_INSPECT(sw, const sw *);
+PROTOTYPES_ERR_IO_INSPECT(sw_decimal, const sw *);
+PROTOTYPES_ERR_IO_INSPECT(sym, const s_sym * const *);
+PROTOTYPES_ERR_IO_INSPECT(tag, const s_tag *);
+PROTOTYPES_ERR_IO_INSPECT(tag_type, e_tag_type);
+PROTOTYPES_ERR_IO_INSPECT(tuple, const s_tuple *);
+PROTOTYPES_ERR_IO_INSPECT(u8, const u8 *);
+PROTOTYPES_ERR_IO_INSPECT(u8_decimal, const u8 *);
+PROTOTYPES_ERR_IO_INSPECT(u16, const u16 *);
+PROTOTYPES_ERR_IO_INSPECT(u16_decimal, const u16 *);
+PROTOTYPES_ERR_IO_INSPECT(u32, const u32 *);
+PROTOTYPES_ERR_IO_INSPECT(u32_decimal, const u32 *);
+PROTOTYPES_ERR_IO_INSPECT(u64, const u64 *);
+PROTOTYPES_ERR_IO_INSPECT(u64_decimal, const u64 *);
+PROTOTYPES_ERR_IO_INSPECT(uw, const uw *);
+PROTOTYPES_ERR_IO_INSPECT(uw_decimal, const uw *);
#endif /* LIBKC3_IO_H */
diff --git a/libkc3/list.c b/libkc3/list.c
index b46a773..2e63bd1 100644
--- a/libkc3/list.c
+++ b/libkc3/list.c
@@ -168,6 +168,8 @@ sw list_length (const s_list *list)
s_list * list_next (const s_list *list)
{
assert(list);
+ if (! list)
+ return NULL;
switch (list->next.type) {
case TAG_LIST: return list->next.data.list;
default: return NULL;
diff --git a/libkc3/list_init.c b/libkc3/list_init.c
index 735d784..a5f0294 100644
--- a/libkc3/list_init.c
+++ b/libkc3/list_init.c
@@ -42,7 +42,7 @@ s_list * list_init_array (s_list *list, const s_sym *type,
uw dimension, const uw *dimensions,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_array(&tmp.tag, type, dimension, dimensions))
@@ -54,7 +54,7 @@ s_list * list_init_array (s_list *list, const s_sym *type,
s_list * list_init_array_copy (s_list *list, const s_array *a,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_array_copy(&tmp.tag, a))
@@ -65,7 +65,7 @@ s_list * list_init_array_copy (s_list *list, const s_array *a,
s_list * list_init_bool (s_list *list, bool b, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_bool(&tmp.tag, b))
@@ -76,7 +76,7 @@ s_list * list_init_bool (s_list *list, bool b, s_list *next)
s_list * list_init_call (s_list *list, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_call(&tmp.tag))
@@ -87,7 +87,7 @@ s_list * list_init_call (s_list *list, s_list *next)
s_list * list_init_character (s_list *list, character c, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_character(&tmp.tag, c))
@@ -98,7 +98,7 @@ s_list * list_init_character (s_list *list, character c, s_list *next)
s_list * list_init_complex (s_list *list, s_complex *c, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_complex(&tmp.tag, c))
@@ -109,7 +109,7 @@ s_list * list_init_complex (s_list *list, s_complex *c, s_list *next)
s_list * list_init_f32 (s_list *list, f32 f, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_f32(&tmp.tag, f))
@@ -120,7 +120,7 @@ s_list * list_init_f32 (s_list *list, f32 f, s_list *next)
s_list * list_init_f64 (s_list *list, f64 f, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_f64(&tmp.tag, f))
@@ -131,7 +131,7 @@ s_list * list_init_f64 (s_list *list, f64 f, s_list *next)
s_list * list_init_f128 (s_list *list, f128 f, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_f128(&tmp.tag, f))
@@ -142,7 +142,7 @@ s_list * list_init_f128 (s_list *list, f128 f, s_list *next)
s_list * list_init_fn_copy (s_list *list, const s_fn *fn, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_fn_copy(&tmp.tag, fn))
@@ -154,7 +154,7 @@ s_list * list_init_fn_copy (s_list *list, const s_fn *fn, s_list *next)
s_list * list_init_ident (s_list *list, const s_ident *ident,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ident(&tmp.tag, ident))
@@ -165,7 +165,7 @@ s_list * list_init_ident (s_list *list, const s_ident *ident,
s_list * list_init_ident_1 (s_list *list, const char *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ident_1(&tmp.tag, p))
@@ -176,7 +176,7 @@ s_list * list_init_ident_1 (s_list *list, const char *p, s_list *next)
s_list * list_init_integer_1 (s_list *list, const char *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_integer_1(&tmp.tag, p))
@@ -188,7 +188,7 @@ s_list * list_init_integer_1 (s_list *list, const char *p, s_list *next)
s_list * list_init_integer_copy (s_list *list, const s_integer *i,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_integer_copy(&tmp.tag, i))
@@ -199,7 +199,7 @@ s_list * list_init_integer_copy (s_list *list, const s_integer *i,
s_list * list_init_integer_zero (s_list *list, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_integer_zero(&tmp.tag))
@@ -210,7 +210,7 @@ s_list * list_init_integer_zero (s_list *list, s_list *next)
s_list * list_init_map (s_list *list, uw count, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_map(&tmp.tag, count))
@@ -221,7 +221,7 @@ s_list * list_init_map (s_list *list, uw count, s_list *next)
s_list * list_init_map_1 (s_list *list, const char *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_map_1(&tmp.tag, p))
@@ -232,7 +232,7 @@ s_list * list_init_map_1 (s_list *list, const char *p, s_list *next)
s_list * list_init_ptr (s_list *list, void *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ptr(&tmp.tag, p))
@@ -243,7 +243,7 @@ s_list * list_init_ptr (s_list *list, void *p, s_list *next)
s_list * list_init_ptr_free (s_list *list, void *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ptr_free(&tmp.tag, p))
@@ -255,7 +255,7 @@ s_list * list_init_ptr_free (s_list *list, void *p, s_list *next)
s_list * list_init_quote_copy (s_list *list, const s_quote *quote,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_quote_copy(&tmp.tag, quote))
@@ -266,7 +266,7 @@ s_list * list_init_quote_copy (s_list *list, const s_quote *quote,
s_list * list_init_ratio_1 (s_list *list, const char *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ratio_1(&tmp.tag, p))
@@ -277,7 +277,7 @@ s_list * list_init_ratio_1 (s_list *list, const char *p, s_list *next)
s_list * list_init_ratio (s_list *list, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ratio(&tmp.tag))
@@ -289,7 +289,7 @@ s_list * list_init_ratio (s_list *list, s_list *next)
s_list * list_init_ratio_copy (s_list *list, const s_ratio *r,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ratio_copy(&tmp.tag, r))
@@ -300,7 +300,7 @@ s_list * list_init_ratio_copy (s_list *list, const s_ratio *r,
s_list * list_init_ratio_zero (s_list *list, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_ratio_zero(&tmp.tag))
@@ -311,7 +311,7 @@ s_list * list_init_ratio_zero (s_list *list, s_list *next)
s_list * list_init_s8 (s_list *list, s8 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_s8(&tmp.tag, i))
@@ -322,7 +322,7 @@ s_list * list_init_s8 (s_list *list, s8 i, s_list *next)
s_list * list_init_s16 (s_list *list, s16 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_s16(&tmp.tag, i))
@@ -333,7 +333,7 @@ s_list * list_init_s16 (s_list *list, s16 i, s_list *next)
s_list * list_init_s32 (s_list *list, s32 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_s32(&tmp.tag, i))
@@ -344,7 +344,7 @@ s_list * list_init_s32 (s_list *list, s32 i, s_list *next)
s_list * list_init_s64 (s_list *list, s64 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_s64(&tmp.tag, i))
@@ -356,7 +356,7 @@ s_list * list_init_s64 (s_list *list, s64 i, s_list *next)
s_list * list_init_str (s_list *list, char *p_free, uw size,
const char *p, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_str(&tmp.tag, p_free, size, p))
@@ -368,7 +368,7 @@ s_list * list_init_str (s_list *list, char *p_free, uw size,
s_list * list_init_str_1 (s_list *list, char *p_free, const char *p,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_str_1(&tmp.tag, p_free, p))
@@ -380,7 +380,7 @@ s_list * list_init_str_1 (s_list *list, char *p_free, const char *p,
s_list * list_init_str_cat (s_list *list, const s_str *a,
const s_str *b, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_str_cat(&tmp.tag, a, b))
@@ -391,7 +391,7 @@ s_list * list_init_str_cat (s_list *list, const s_str *a,
s_list * list_init_str_empty (s_list *list, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_str_empty(&tmp.tag))
@@ -403,7 +403,7 @@ s_list * list_init_str_empty (s_list *list, s_list *next)
s_list * list_init_struct (s_list *list, const s_sym *module,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_struct(&tmp.tag, module))
@@ -416,7 +416,7 @@ s_list * list_init_struct_with_data (s_list *list, const s_sym *module,
void *data, bool free_data,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_struct_with_data(&tmp.tag, module, data, free_data))
@@ -428,7 +428,7 @@ s_list * list_init_struct_with_data (s_list *list, const s_sym *module,
s_list * list_init_struct_type (s_list *list, const s_sym *module,
const s_list *spec, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_struct_type(&tmp.tag, module, spec))
@@ -442,7 +442,7 @@ s_list * list_init_struct_type_update_clean (s_list *list,
const s_cfn *clean,
s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_struct_type_update_clean(&tmp.tag, st, clean))
@@ -453,7 +453,7 @@ s_list * list_init_struct_type_update_clean (s_list *list,
s_list * list_init_sw (s_list *list, sw i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_sw(&tmp.tag, i))
@@ -464,7 +464,7 @@ s_list * list_init_sw (s_list *list, sw i, s_list *next)
s_list * list_init_sym (s_list *list, const s_sym *sym, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_sym(&tmp.tag, sym))
@@ -475,7 +475,7 @@ s_list * list_init_sym (s_list *list, const s_sym *sym, s_list *next)
s_list * list_init_tuple (s_list *list, uw count, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_tuple(&tmp.tag, count))
@@ -487,7 +487,7 @@ s_list * list_init_tuple (s_list *list, uw count, s_list *next)
s_list * list_init_tuple_2 (s_list *list, const s_tag *a,
const s_tag *b, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_tuple_2(&tmp.tag, a, b))
@@ -498,7 +498,7 @@ s_list * list_init_tuple_2 (s_list *list, const s_tag *a,
s_list * list_init_u8 (s_list *list, u8 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_u8(&tmp.tag, i))
@@ -509,7 +509,7 @@ s_list * list_init_u8 (s_list *list, u8 i, s_list *next)
s_list * list_init_u16 (s_list *list, u16 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_u16(&tmp.tag, i))
@@ -520,7 +520,7 @@ s_list * list_init_u16 (s_list *list, u16 i, s_list *next)
s_list * list_init_u32 (s_list *list, u32 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_u32(&tmp.tag, i))
@@ -531,7 +531,7 @@ s_list * list_init_u32 (s_list *list, u32 i, s_list *next)
s_list * list_init_u64 (s_list *list, u64 i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_u64(&tmp.tag, i))
@@ -543,7 +543,7 @@ s_list * list_init_u64 (s_list *list, u64 i, s_list *next)
s_list * list_init_unquote_copy (s_list *list,
const s_unquote *unquote, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_unquote_copy(&tmp.tag, unquote))
@@ -554,7 +554,7 @@ s_list * list_init_unquote_copy (s_list *list,
s_list * list_init_uw (s_list *list, uw i, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_uw(&tmp.tag, i))
@@ -565,7 +565,7 @@ s_list * list_init_uw (s_list *list, uw i, s_list *next)
s_list * list_init_var (s_list *list, const s_sym *type, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_var(&tmp.tag, type))
@@ -576,7 +576,7 @@ s_list * list_init_var (s_list *list, const s_sym *type, s_list *next)
s_list * list_init_void (s_list *list, s_list *next)
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_void(&tmp.tag))
diff --git a/libkc3/map.c b/libkc3/map.c
index 03d2e62..84331ad 100644
--- a/libkc3/map.c
+++ b/libkc3/map.c
@@ -193,10 +193,10 @@ s_map * map_init_from_lists (s_map *map, const s_list *keys,
s_list ** map_map (const s_map *map, const s_fn *fn, s_list **result)
{
- s_list *args;
+ s_list *args = NULL;
uw i = 0;
- s_list **t;
- s_list *tmp;
+ s_list **t = NULL;
+ s_list *tmp = NULL;
assert(map);
assert(fn);
assert(result);
@@ -302,7 +302,7 @@ s_map * map_sort (s_map *map)
s_map * map_update (const s_map *map, const s_tag *key,
const s_tag *value, s_map *dest)
{
- s_map tmp;
+ s_map tmp = {0};
uw i = 0;
map_init_copy(&tmp, map);
while (i < map->count) {
@@ -321,8 +321,8 @@ s_map * map_update (const s_map *map, const s_tag *key,
s_map * map_update_list (const s_map *map, const s_list *alist, s_map *dest)
{
- const s_list *i;
- s_map tmp;
+ const s_list *i = NULL;
+ s_map tmp = {0};
assert(map);
map_init_copy(&tmp, map);
i = alist;
diff --git a/libkc3/ratio.c b/libkc3/ratio.c
index dd28145..f96b997 100644
--- a/libkc3/ratio.c
+++ b/libkc3/ratio.c
@@ -22,9 +22,9 @@
s_ratio * ratio_add (const s_ratio *a, const s_ratio *b, s_ratio *dest)
{
- s_ratio tmp;
- s_integer i;
- s_integer j;
+ s_ratio tmp = {0};
+ s_integer i = {0};
+ s_integer j = {0};
assert(a);
assert(b);
assert(dest);
@@ -115,10 +115,10 @@ s_ratio * ratio_init (s_ratio *dest)
s_ratio * ratio_init_1 (s_ratio *q, const char *p)
{
- s_buf buf;
+ s_buf buf = {0};
uw len;
sw r;
- s_ratio tmp;
+ s_ratio tmp = {0};
assert(q);
assert(p);
if (! p)
@@ -475,9 +475,9 @@ s_tag * ratio_sqrt (const s_ratio *r, s_tag *dest)
s_ratio * ratio_sub (const s_ratio *a, const s_ratio *b,
s_ratio *dest)
{
- s_ratio tmp;
- s_integer i;
- s_integer j;
+ s_ratio tmp = {0};
+ s_integer i = {0};
+ s_integer j = {0};
assert(a);
assert(b);
assert(dest);
diff --git a/libkc3/str.c b/libkc3/str.c
index f5cfba5..f58568d 100644
--- a/libkc3/str.c
+++ b/libkc3/str.c
@@ -68,8 +68,8 @@ sw str_character_position (const s_str *str, character c)
{
uw i = 0;
sw r = 0;
- s_str tmp;
- character tmp_c;
+ s_str tmp = {0};
+ character tmp_c = 0;
assert(str);
tmp = *str;
while (tmp.size && (r = str_read_character_utf8(&tmp, &tmp_c)) > 0) {
@@ -136,7 +136,7 @@ s_str * str_init_1 (s_str *str, char *free, const char *p)
s_str * str_init_alloc (s_str *str, uw size, const char *p)
{
- s_str tmp;
+ s_str tmp = {0};
assert(str);
tmp.free.p = alloc(size + 1);
if (! tmp.free.p)
@@ -636,8 +636,8 @@ uw * str_rindex_character (const s_str *str, character c, uw *dest)
{
uw i = 0;
sw result = -1;
- s_str s;
- character tmp;
+ s_str s = {0};
+ character tmp = 0;
s = *str;
while (str_read_character_utf8(&s, &tmp) > 0) {
if (c == tmp)
diff --git a/libkc3/struct.c b/libkc3/struct.c
index 75969b3..e82ec13 100644
--- a/libkc3/struct.c
+++ b/libkc3/struct.c
@@ -55,7 +55,7 @@ s_tag * struct_access (const s_struct *s, const s_sym *key, s_tag *dest)
s_struct * struct_allocate (s_struct *s)
{
- s_struct tmp;
+ s_struct tmp = {0};
assert(s);
assert(s->type);
if (s->data) {
diff --git a/libkc3/struct_type.c b/libkc3/struct_type.c
index a2839e2..146e438 100644
--- a/libkc3/struct_type.c
+++ b/libkc3/struct_type.c
@@ -175,7 +175,7 @@ s_struct_type * struct_type_init_update_clean (s_struct_type *st,
s_struct_type * struct_type_init_copy (s_struct_type *st,
const s_struct_type *src)
{
- s_struct_type tmp;
+ s_struct_type tmp = {0};
assert(st);
assert(src);
assert(src->module);
diff --git a/libkc3/sym.c b/libkc3/sym.c
index e3ff5df..6d12f4f 100644
--- a/libkc3/sym.c
+++ b/libkc3/sym.c
@@ -133,7 +133,7 @@ const s_sym * sym_array_type (const s_sym *sym)
sw r;
bool separator;
s_str str;
- const s_sym *tmp;
+ const s_sym *tmp = {0};
assert(sym);
buf_init_alloc(&buf, sym->str.size);
str = sym->str;
@@ -196,7 +196,7 @@ void sym_delete_all (void)
sym_list = g_sym_list;
g_sym_list = NULL;
while (sym_list) {
- s_sym_list *tmp;
+ s_sym_list *tmp = NULL;
tmp = sym_list;
sym_list = sym_list->next;
if (tmp->free_sym)
@@ -408,7 +408,7 @@ void sym_init_g_sym (void)
const s_sym ** sym_init_str (const s_sym **sym, const s_str *src)
{
- const s_sym *tmp;
+ const s_sym *tmp = NULL;
tmp = sym_find(src);
if (! tmp)
tmp = sym_new(src);
@@ -420,7 +420,7 @@ const s_sym ** sym_init_str (const s_sym **sym, const s_str *src)
bool sym_register (const s_sym *sym, s_sym *free_sym)
{
- s_sym_list *tmp;
+ s_sym_list *tmp = NULL;
assert(sym);
if (sym_find(&sym->str))
return false;
@@ -656,8 +656,8 @@ bool * sym_must_clean (const s_sym *sym, bool *must_clean)
const s_sym * sym_new (const s_str *src)
{
- s_sym *sym;
- s_sym_list *tmp;
+ s_sym *sym = NULL;
+ s_sym_list *tmp = NULL;
sym = alloc(sizeof(s_sym));
if (! sym)
return NULL;
diff --git a/libkc3/tag_add.c b/libkc3/tag_add.c
index 5ab1cd0..cd9b707 100644
--- a/libkc3/tag_add.c
+++ b/libkc3/tag_add.c
@@ -18,10 +18,10 @@
s_tag * tag_add (const s_tag *a, const s_tag *b, s_tag *dest)
{
- s_complex c;
- s_integer tmp;
- s_integer tmp2;
- s_ratio r;
+ s_complex c = {0};
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
+ s_ratio r = {0};
assert(a);
assert(b);
assert(dest);
diff --git a/libkc3/tag_band.c b/libkc3/tag_band.c
index 7664ad2..214640b 100644
--- a/libkc3/tag_band.c
+++ b/libkc3/tag_band.c
@@ -16,8 +16,8 @@
s_tag * tag_band (const s_tag *a, const s_tag *b, s_tag *result)
{
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
assert(a);
assert(b);
assert(result);
diff --git a/libkc3/tag_bor.c b/libkc3/tag_bor.c
index dcfcc53..a8ce33b 100644
--- a/libkc3/tag_bor.c
+++ b/libkc3/tag_bor.c
@@ -16,8 +16,8 @@
s_tag * tag_bor (const s_tag *a, const s_tag *b, s_tag *result)
{
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
assert(a);
assert(b);
assert(result);
diff --git a/libkc3/tag_bxor.c b/libkc3/tag_bxor.c
index 9f3f8a1..563e6b7 100644
--- a/libkc3/tag_bxor.c
+++ b/libkc3/tag_bxor.c
@@ -16,8 +16,8 @@
s_tag * tag_bxor (const s_tag *a, const s_tag *b, s_tag *result)
{
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
assert(a);
assert(b);
assert(result);
diff --git a/libkc3/tag_div.c b/libkc3/tag_div.c
index 6108989..3b393fc 100644
--- a/libkc3/tag_div.c
+++ b/libkc3/tag_div.c
@@ -19,10 +19,10 @@
s_tag * tag_div (const s_tag *a, const s_tag *b, s_tag *dest)
{
- s_complex c;
- s_integer tmp;
- s_integer tmp2;
- s_ratio r;
+ s_complex c = {0};
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
+ s_ratio r = {0};
assert(a);
assert(b);
assert(dest);
diff --git a/libkc3/tag_init.rb b/libkc3/tag_init.rb
index 245839b..e233c06 100644
--- a/libkc3/tag_init.rb
+++ b/libkc3/tag_init.rb
@@ -214,7 +214,7 @@ EOF
#{list_init_proto[0..-2]}
{
- s_list tmp;
+ s_list tmp = {0};
assert(list);
list_init(&tmp, next);
if (! tag_init_#{name_suffix}(&tmp.tag#{comma_args}))
diff --git a/libkc3/tag_mod.c b/libkc3/tag_mod.c
index 0d168f9..0323b31 100644
--- a/libkc3/tag_mod.c
+++ b/libkc3/tag_mod.c
@@ -17,8 +17,8 @@
s_tag * tag_mod (const s_tag *a, const s_tag *b, s_tag *dest)
{
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
assert(a);
assert(b);
assert(dest);
diff --git a/libkc3/tag_mul.c b/libkc3/tag_mul.c
index 7c305c0..6ac6ff3 100644
--- a/libkc3/tag_mul.c
+++ b/libkc3/tag_mul.c
@@ -19,10 +19,10 @@
s_tag * tag_mul (const s_tag *a, const s_tag *b, s_tag *dest)
{
- s_complex c;
- s_ratio r;
- s_integer tmp;
- s_integer tmp2;
+ s_complex c = {0};
+ s_ratio r = {0};
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
assert(a);
assert(b);
assert(dest);
diff --git a/libkc3/tag_neg.c b/libkc3/tag_neg.c
index e3a867a..52bae1b 100644
--- a/libkc3/tag_neg.c
+++ b/libkc3/tag_neg.c
@@ -17,7 +17,7 @@
s_tag * tag_neg (const s_tag *tag, s_tag *result)
{
- s_integer tmp;
+ s_integer tmp = {0};
switch (tag->type) {
case TAG_INTEGER:
result->type = TAG_INTEGER;
diff --git a/libkc3/tag_shift_left.c b/libkc3/tag_shift_left.c
index 988f89b..6afe744 100644
--- a/libkc3/tag_shift_left.c
+++ b/libkc3/tag_shift_left.c
@@ -16,8 +16,8 @@
s_tag * tag_shift_left (const s_tag *a, const s_tag *b, s_tag *result)
{
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
s_tag tmp_a;
switch (a->type) {
case TAG_BOOL:
diff --git a/libkc3/tag_shift_right.c b/libkc3/tag_shift_right.c
index 413bd5e..41f8d66 100644
--- a/libkc3/tag_shift_right.c
+++ b/libkc3/tag_shift_right.c
@@ -16,8 +16,8 @@
s_tag * tag_shift_right (const s_tag *a, const s_tag *b, s_tag *result)
{
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
s_tag tmp_a;
switch (a->type) {
case TAG_BOOL:
diff --git a/libkc3/tag_sub.c b/libkc3/tag_sub.c
index a47572e..3a5165e 100644
--- a/libkc3/tag_sub.c
+++ b/libkc3/tag_sub.c
@@ -20,8 +20,8 @@
s_tag * tag_sub (const s_tag *a, const s_tag *b, s_tag *dest)
{
s_complex c;
- s_integer tmp;
- s_integer tmp2;
+ s_integer tmp = {0};
+ s_integer tmp2 = {0};
s_ratio r;
assert(a);
assert(b);
diff --git a/libkc3/time.c b/libkc3/time.c
index f44af84..c5b438a 100644
--- a/libkc3/time.c
+++ b/libkc3/time.c
@@ -34,7 +34,7 @@ f64 * time_to_f64 (const s_time *time, f64 *dest)
s_tag * time_to_tag (const s_time *time, s_tag *dest)
{
- s_tag tmp;
+ s_tag tmp = {0};
assert(time);
if (! tag_init_tuple(&tmp, 2))
return NULL;
diff --git a/libkc3/tuple.c b/libkc3/tuple.c
index 7b00067..0d0ec66 100644
--- a/libkc3/tuple.c
+++ b/libkc3/tuple.c
@@ -42,7 +42,7 @@ void tuple_delete (s_tuple *tuple)
s_tuple * tuple_init (s_tuple *tuple, uw count)
{
uw i;
- s_tuple tmp;
+ s_tuple tmp = {0};
assert(tuple);
assert(2 <= count);
tmp.count = count;
diff --git a/libkc3/var.c b/libkc3/var.c
index c01246a..6de5913 100644
--- a/libkc3/var.c
+++ b/libkc3/var.c
@@ -35,7 +35,7 @@ s_tag * var_init_cast (s_tag *tag, const s_sym * const *type,
const s_tag *src)
{
void *data;
- s_tag tmp;
+ s_tag tmp = {0};
assert(tag);
assert(type);
assert(src);
diff --git a/test/Makefile b/test/Makefile
index 314339f..8de70e0 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -72,16 +72,16 @@ gcovr:
gcovr --gcov-executable ${GCOV} --html-details test.html
gdb_test: debug
- if [ -f libkc3_test_debug.core ]; then gdb .libs/libkc3_test_debug libkc3_test_debug.core; else gdb .libs/libkc3_test_debug; fi
+ if [ -f libkc3_test_debug.core ]; then ${GDB} .libs/libkc3_test_debug libkc3_test_debug.core; else ${GDB} .libs/libkc3_test_debug; fi
gdb_test_ekc3:
- cd ekc3 && gdb ../../kc3s/.libs/kc3s_debug
+ cd ekc3 && ${GDB} ../../kc3s/.libs/kc3s_debug
gdb_test_http:
- cd http && gdb ../../ikc3/.libs/ikc3_debug
+ cd http && ${GDB} ../../ikc3/.libs/ikc3_debug
gdb_test_ikc3:
- cd ikc3 && gdb ../../ikc3/.libs/ikc3_debug
+ cd ikc3 && ${GDB} ../../ikc3/.libs/ikc3_debug
lldb_test: debug
if [ -f libkc3_test_debug.core ]; then lldb .libs/libkc3_test_debug libkc3_test_debug.core; else lldb .libs/libkc3_test_debug; fi