Commit 520cc2342a82908a8ad4a9fc8236e1a965ceddfa

Baptiste 2024-08-05T14:06:58

corrected compilation error on debian

diff --git a/libkc3/str.c b/libkc3/str.c
index 42e2476..016b5ec 100644
--- a/libkc3/str.c
+++ b/libkc3/str.c
@@ -599,7 +599,7 @@ bool str_parse_eval (const s_str *str, s_tag *dest)
   sw r;
   s_tag tag;
   s_tag tmp = {0};
-  buf_init_str(&in_buf, false, (s_str *) str);
+  buf_init_str_const(&in_buf, str);
   if (! buf_init_alloc(&out_buf, str->size))
     goto restore;
   tail = &list;
diff --git a/libkc3/types.h b/libkc3/types.h
index e1e6c81..b4a5c4d 100644
--- a/libkc3/types.h
+++ b/libkc3/types.h
@@ -62,11 +62,11 @@ typedef unsigned long      uw;
 #define S64_MAX ((s64) (((u64) 1 << (8 * sizeof(s64) - 1)) - 1))
 #define SW_MAX  ((sw)  (((uw)  1 << (8 * sizeof(sw)  - 1)) - 1))
 
-#define S8_MIN  ((s8)  -1 << (8 * sizeof(s8)  - 1))
-#define S16_MIN ((s16) -1 << (8 * sizeof(s16) - 1))
-#define S32_MIN ((s32) -1 << (8 * sizeof(s32) - 1))
-#define S64_MIN ((s64) -1 << (8 * sizeof(s64) - 1))
-#define SW_MIN  ((sw)  -1 << (8 * sizeof(sw)  - 1))
+#define S8_MIN  ((s8)  ((u8)  1 << (8 * sizeof(s8)  - 1)))
+#define S16_MIN ((s16) ((u16) 1 << (8 * sizeof(s16) - 1)))
+#define S32_MIN ((s32) ((u32) 1 << (8 * sizeof(s32) - 1)))
+#define S64_MIN ((s64) ((u64) 1 << (8 * sizeof(s64) - 1)))
+#define SW_MIN  ((sw)  ((uw)  1 << (8 * sizeof(sw)  - 1)))
 
 #define U8_MAX  ((u8)  ~ 0)
 #define U16_MAX ((u16) ~ 0)