From: cassowarii Date: Tue, 14 Jul 2026 17:57:54 +0000 (-0700) Subject: fix clang warnings X-Git-Url: https://www.git.cassowary.me/gitweb.cgi?a=commitdiff_plain;h=d37e3f89b63aee3896f2ebbe9da9c6ba7f821253;p=sarabande.git fix clang warnings --- diff --git a/src/lib/lib.c b/src/lib/lib.c index 20fddd1..58db2e5 100644 --- a/src/lib/lib.c +++ b/src/lib/lib.c @@ -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); diff --git a/src/vm/operations.c b/src/vm/operations.c index 0904670..507ae37 100644 --- a/src/vm/operations.c +++ b/src/vm/operations.c @@ -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;