Fixed compiler warnings

svn path=/trunk/; revision=1442
This commit is contained in:
Eric Kohl 2000-12-02 02:25:30 +00:00
parent 55feb47d30
commit 9deb8f01da
8 changed files with 17 additions and 52 deletions

View file

@ -1,15 +1,12 @@
typedef unsigned int size_t; #include <crtdll/string.h>
void *
memcpy (char *to, char *from, size_t count);
/* This is the most reliable way to avoid incompatibilities /* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */ in available built-in functions on various systems. */
void * void *
memcpy (char *to, char *from, size_t count) memcpy (void *to, const void *from, size_t count)
{ {
register char *f = from; register char *f = (char *)from;
register char *t = to; register char *t = (char *)to;
register int i = count; register int i = count;
while (i-- > 0) while (i-- > 0)
@ -17,15 +14,3 @@ memcpy (char *to, char *from, size_t count)
return to; return to;
} }
void *__constant_memcpy(char *to, char *from, size_t count)
{
return memcpy(to,from,count);
}
void *__memcpy(char *to, char *from, size_t count)
{
return memcpy(to,from,count);
}

View file

@ -1,8 +1,8 @@
typedef int size_t; #include <crtdll/string.h>
void * memset(void *src,int val,size_t count) void * memset(void *src,int val,size_t count)
{ {
char *char_src = src; char *char_src = (char *)src;
while(count>0) { while(count>0) {
*char_src = val; *char_src = val;
@ -11,19 +11,3 @@ void * memset(void *src,int val,size_t count)
} }
return src; return src;
} }
void *__memset_generic(void *src,int val,size_t count)
{
return memset(src,val,count);
}
void * __constant_c_and_count_memset(void * s, unsigned long pattern, size_t count)
{
return memset(s,pattern,count);
}
void * __constant_c_memset(void *src,int val,size_t count)
{
return memset(src,val,count);
}

View file

@ -1,7 +1,6 @@
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#include <string.h>
#include <crtdll/string.h>
void * void *
memchr(const void *s, int c, size_t n) memchr(const void *s, int c, size_t n)

View file

@ -1,15 +1,12 @@
typedef unsigned int size_t; #include <string.h>
void *
memcpy (char *to, char *from, size_t count);
/* This is the most reliable way to avoid incompatibilities /* This is the most reliable way to avoid incompatibilities
in available built-in functions on various systems. */ in available built-in functions on various systems. */
void * void *
memcpy (char *to, char *from, size_t count) memcpy (void *to, const void *from, size_t count)
{ {
register char *f = from; register char *f = (char *)from;
register char *t = to; register char *t = (char *)to;
register int i = count; register int i = count;
while (i-- > 0) while (i-- > 0)

View file

@ -1,8 +1,8 @@
typedef int size_t; #include <string.h>
void * memset(void *src,int val,size_t count) void * memset(void *src,int val,size_t count)
{ {
char *char_src = src; char *char_src = (char *)src;
while(count>0) { while(count>0) {
*char_src = val; *char_src = val;

View file

@ -19,8 +19,8 @@
#undef memcpy #undef memcpy
void *memcpy (void *to, const void *from, size_t count) void *memcpy (void *to, const void *from, size_t count)
{ {
const char *f = from; const char *f = (char*)from;
char *t = to; char *t = (char *)to;
int i = count; int i = count;
while (i-- > 0) while (i-- > 0)

View file

@ -3,7 +3,7 @@
void * memset(void *src, int val, size_t count) void * memset(void *src, int val, size_t count)
{ {
char *char_src = src; char *char_src = (char *)src;
while(count>0) { while(count>0) {
*char_src = val; *char_src = val;