diff --git a/lib/stdio/fputc.c b/lib/stdio/fputc.c index 232b534a..4931e710 100644 --- a/lib/stdio/fputc.c +++ b/lib/stdio/fputc.c @@ -23,5 +23,5 @@ int fputc (int c, FILE * stream) { - return fdputc (c, (int) stream); + return fdputc (c, (long) stream); } diff --git a/lib/stdlib/malloc.c b/lib/stdlib/malloc.c index 940f95b5..e16f0036 100644 --- a/lib/stdlib/malloc.c +++ b/lib/stdlib/malloc.c @@ -24,7 +24,7 @@ void * malloc (size_t size) { if (!__brk) - __brk = brk (0); + __brk = (char *) brk (0); if (brk (__brk + size) == -1) return 0; char *p = __brk; diff --git a/lib/string/memchr.c b/lib/string/memchr.c index eac13a9f..66485d4b 100644 --- a/lib/string/memchr.c +++ b/lib/string/memchr.c @@ -27,7 +27,7 @@ memchr (void const *block, int c, size_t size) while (size--) { if (c == *p) - return p; + return (void *) p; p++; } return 0; diff --git a/lib/string/memcmp.c b/lib/string/memcmp.c index 1d67e202..5c28af8c 100644 --- a/lib/string/memcmp.c +++ b/lib/string/memcmp.c @@ -25,8 +25,8 @@ memcmp (void const *s1, void const *s2, size_t size) { if (!size) return 0; - char *a = s1; - char *b = s2; + char const *a = s1; + char const *b = s2; while (*a == *b && --size) { a++;