mescc: Mes C Library: Fix compile warnings.
* lib/stdio/fputc.c (fputc): Oops, stream is a long. * lib/stdlib/malloc.c (malloc): Cast to char *. FIXME * lib/string/memchr.c (memchr): Cast to void *. * lib/string/memcmp.c (memcmp): Add const cast.
This commit is contained in:
parent
198d4a652d
commit
eff35b8a54
|
@ -23,5 +23,5 @@
|
|||
int
|
||||
fputc (int c, FILE * stream)
|
||||
{
|
||||
return fdputc (c, (int) stream);
|
||||
return fdputc (c, (long) stream);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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++;
|
||||
|
|
Loading…
Reference in a new issue