From 81819f711e6d1f9216f688da8ecbbc682d106d9c Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Thu, 23 Nov 2023 00:52:35 +0100 Subject: LibC: Reduce warnings in code --- userland/libc/stdio/open_memstream.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'userland/libc/stdio/open_memstream.c') diff --git a/userland/libc/stdio/open_memstream.c b/userland/libc/stdio/open_memstream.c index 8f359b9..0d3df86 100644 --- a/userland/libc/stdio/open_memstream.c +++ b/userland/libc/stdio/open_memstream.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -34,7 +35,7 @@ size_t memstream_write(FILE *fp, const unsigned char *buf, size_t n) { memcpy(c->buffer + fp->offset_in_file, buf, n); fp->offset_in_file += n; - if (fp->offset_in_file > c->buffer_usage) + if (fp->offset_in_file > (long)c->buffer_usage) c->buffer_usage = fp->offset_in_file; return n; } -- cgit v1.2.3