From 568a0b7017e8e779731325083015907b006866c3 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 18 Apr 2024 16:47:36 +0200 Subject: LibC: Fix compiler warnings It can now compile with almost all compiler warnings turned on without producing any warnings. --- userland/libc/tb/sb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'userland/libc/tb/sb.c') diff --git a/userland/libc/tb/sb.c b/userland/libc/tb/sb.c index 0d0ec52..c3fbc64 100644 --- a/userland/libc/tb/sb.c +++ b/userland/libc/tb/sb.c @@ -33,7 +33,7 @@ void sb_append_char(struct sb *ctx, char c) { ctx->length++; } -int sb_delete_right(struct sb *ctx, int n) { +int sb_delete_right(struct sb *ctx, size_t n) { n = min(n, ctx->length); ctx->length -= n; return n; -- cgit v1.2.3