ref: 5ac3a0d4c1a9d7e4d3912c4770084b885007aca6
parent: 560a156341e5bb352194a85c3258406a079697b7
author: Roberto E. Vargas Caballero <[email protected]>
date: Fri Jul 1 20:00:37 EDT 2022
libc: Fix pointer types in setvbuf() Pointers with different signess cannot be assigned.
--- a/src/libc/stdio/setvbuf.c
+++ b/src/libc/stdio/setvbuf.c
@@ -10,7 +10,7 @@
setvbuf(FILE *restrict fp, char *restrict buf, int mode, size_t size)
{
int flags;
- char *p;
+ unsigned char *p;
size_t l;
if (_flsbuf(fp) == EOF)
@@ -17,7 +17,7 @@
return EOF;
if (buf)
- p = buf, l = size;
+ p = (unsigned char *) buf, l = size;
else
p = fp->buf, l = fp->len;