fix clang warnings
authorcassowarii <cassowary@cassowary.me>
Tue, 14 Jul 2026 17:57:54 +0000 (10:57 -0700)
committercassowarii <cassowary@cassowary.me>
Tue, 14 Jul 2026 17:57:54 +0000 (10:57 -0700)
src/lib/lib.c
src/vm/operations.c

index 20fddd1..58db2e5 100644 (file)
@@ -113,7 +113,7 @@ void sbLib_resolve_property(hVm vm) {
 
   hV *method_name_val = sbVm_pop(vm);
   if (method_name_val->type != IT_SYMBOL) {
-    PANIC("method name must be symbol! (is %zd, target %zd)", method_name_val->type, target->type);
+    PANIC("method name must be symbol! (is %lld, target %lld)", (long long)method_name_val->type, (long long)target->type);
   }
 
   sbLibTable *table_to_use = find_method_table(target);
index 0904670..507ae37 100644 (file)
@@ -44,7 +44,7 @@ hV sbV_mod(const hV *a, const hV *b) {
   if (a->type == IT_INTEGER && b->type == IT_INTEGER) {
     return sbV_int(a->integer % b->integer);
   } else {
-    PANIC("todo %zd", a->type);
+    PANIC("todo %lld", (long long)a->type);
   }
 }
 
@@ -170,7 +170,7 @@ hV sbV_rangeindex(hV *a, hV *b, hV *c) {
       const char *strdata = sbString_get_value(a->string, scratch, &length);
       if (min >= max || min >= length || max < 0) {
         /* backwards or out of range */
-        return sbV_empty_string(0);
+        return sbV_empty_string();
       } else {
         /* now we know 0 <= max, min < max, min < length. clip min and max to bounds */
         if (max >= length) max = length;