summaryrefslogtreecommitdiff
path: root/userland/libc/tb
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-18 16:47:36 +0200
committerAnton Kling <anton@kling.gg>2024-04-18 16:47:36 +0200
commit568a0b7017e8e779731325083015907b006866c3 (patch)
treeae2f78d7fee945a90e29eb3eb71024be43077d76 /userland/libc/tb
parentcc2b68cb26738dce0c7696ca0fe5b0cd8b24c171 (diff)
LibC: Fix compiler warnings
It can now compile with almost all compiler warnings turned on without producing any warnings.
Diffstat (limited to 'userland/libc/tb')
-rw-r--r--userland/libc/tb/sb.c2
-rw-r--r--userland/libc/tb/sv.c1
2 files changed, 2 insertions, 1 deletions
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;
diff --git a/userland/libc/tb/sv.c b/userland/libc/tb/sv.c
index 9bffce3..500d041 100644
--- a/userland/libc/tb/sv.c
+++ b/userland/libc/tb/sv.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
#include <tb/sv.h>
+#include <math.h>
char *SV_TO_C(struct sv s) {
char *c_string = malloc(s.length + 1);