Browse Source

Correct Warning: function declaration isn't a prototype

Peter S. Mazinger 19 years ago
parent
commit
6b8c0cedae

+ 1 - 4
libc/string/generic/memset.c

@@ -21,10 +21,7 @@
 
 
 #undef memset
 #undef memset
 
 
-void attribute_hidden *__memset (dstpp, c, len)
+void attribute_hidden *__memset (void *dstpp, int c, size_t len)
-     void *dstpp;
-     int c;
-     size_t len;
 {
 {
   long int dstp = (long int) dstpp;
   long int dstp = (long int) dstpp;
 
 

+ 1 - 3
libc/string/generic/strcat.c

@@ -22,9 +22,7 @@
 #undef strcat
 #undef strcat
 
 
 /* Append SRC on the end of DEST.  */
 /* Append SRC on the end of DEST.  */
-char attribute_hidden *__strcat (dest, src)
+char attribute_hidden *__strcat (char *dest, const char *src)
-     char *dest;
-     const char *src;
 {
 {
   char *s1 = dest;
   char *s1 = dest;
   const char *s2 = src;
   const char *s2 = src;

+ 1 - 3
libc/string/generic/strchr.c

@@ -29,9 +29,7 @@
 #undef strchr
 #undef strchr
 
 
 /* Find the first occurrence of C in S.  */
 /* Find the first occurrence of C in S.  */
-char attribute_hidden *__strchr (s, c_in)
+char attribute_hidden *__strchr (const char *s, int c_in)
-     const char *s;
-     int c_in;
 {
 {
   const unsigned char *char_ptr;
   const unsigned char *char_ptr;
   const unsigned long int *longword_ptr;
   const unsigned long int *longword_ptr;

+ 1 - 3
libc/string/generic/strcmp.c

@@ -26,9 +26,7 @@
 /* Compare S1 and S2, returning less than, equal to or
 /* Compare S1 and S2, returning less than, equal to or
    greater than zero if S1 is lexicographically less than,
    greater than zero if S1 is lexicographically less than,
    equal to or greater than S2.  */
    equal to or greater than S2.  */
-int attribute_hidden __strcmp (p1, p2)
+int attribute_hidden __strcmp (const char *p1, const char *p2)
-     const char *p1;
-     const char *p2;
 {
 {
   register const unsigned char *s1 = (const unsigned char *) p1;
   register const unsigned char *s1 = (const unsigned char *) p1;
   register const unsigned char *s2 = (const unsigned char *) p2;
   register const unsigned char *s2 = (const unsigned char *) p2;

+ 1 - 3
libc/string/generic/strcpy.c

@@ -25,9 +25,7 @@
 #undef strcpy
 #undef strcpy
 
 
 /* Copy SRC to DEST.  */
 /* Copy SRC to DEST.  */
-char attribute_hidden *__strcpy (dest, src)
+char attribute_hidden *__strcpy (char *dest, const char *src)
-     char *dest;
-     const char *src;
 {
 {
   reg_char c;
   reg_char c;
   char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src);
   char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src);

+ 1 - 2
libc/string/generic/strlen.c

@@ -26,8 +26,7 @@
 
 
 /* Return the length of the null-terminated string STR.  Scan for
 /* Return the length of the null-terminated string STR.  Scan for
    the null terminator quickly by testing four bytes at a time.  */
    the null terminator quickly by testing four bytes at a time.  */
-size_t attribute_hidden __strlen (str)
+size_t attribute_hidden __strlen (const char *str)
-     const char *str;
 {
 {
   const char *char_ptr;
   const char *char_ptr;
   const unsigned long int *longword_ptr;
   const unsigned long int *longword_ptr;

+ 1 - 4
libc/string/generic/strncat.c

@@ -22,10 +22,7 @@
 
 
 #undef strncat
 #undef strncat
 
 
-char attribute_hidden *__strncat (s1, s2, n)
+char attribute_hidden *__strncat (char *s1, const char *s2, size_t n)
-     char *s1;
-     const char *s2;
-     size_t n;
 {
 {
   reg_char c;
   reg_char c;
   char *s = s1;
   char *s = s1;

+ 1 - 4
libc/string/generic/strncpy.c

@@ -21,10 +21,7 @@
 
 
 #undef strncpy
 #undef strncpy
 
 
-char attribute_hidden *__strncpy (s1, s2, n)
+char attribute_hidden *__strncpy (char *s1, const char *s2, size_t n)
-     char *s1;
-     const char *s2;
-     size_t n;
 {
 {
   reg_char c;
   reg_char c;
   char *s = s1;
   char *s = s1;

+ 2 - 2
libc/string/strdup.c

@@ -9,8 +9,8 @@
 
 
 #undef Wstrlen
 #undef Wstrlen
 #undef Wstrcpy
 #undef Wstrcpy
-#define Wstrlen __strlen
+#define Wstrlen strlen
-#define Wstrcpy __strcpy
+#define Wstrcpy strcpy
 
 
 #include "wstring.c"
 #include "wstring.c"
 
 

+ 2 - 2
libc/string/strtok_r.c

@@ -8,9 +8,9 @@
 #define Wstrtok_r __strtok_r
 #define Wstrtok_r __strtok_r
 
 
 #undef Wstrspn
 #undef Wstrspn
-#define Wstrspn __strspn
+#define Wstrspn strspn
 #undef Wstrpbrk
 #undef Wstrpbrk
-#define Wstrpbrk __strpbrk
+#define Wstrpbrk strpbrk
 
 
 #include "wstring.c"
 #include "wstring.c"
 
 

+ 2 - 2
libc/string/wcsdup.c

@@ -10,8 +10,8 @@
 
 
 #undef Wstrlen
 #undef Wstrlen
 #undef Wstrcpy
 #undef Wstrcpy
-#define Wstrlen __wcslen
+#define Wstrlen wcslen
-#define Wstrcpy __wcscpy
+#define Wstrcpy wcscpy
 
 
 #include "wstring.c"
 #include "wstring.c"
 
 

+ 2 - 2
libc/string/wcstok.c

@@ -9,9 +9,9 @@
 #define Wstrtok_r __wcstok
 #define Wstrtok_r __wcstok
 
 
 #undef Wstrspn
 #undef Wstrspn
-#define Wstrspn __wcsspn
+#define Wstrspn wcsspn
 #undef Wstrpbrk
 #undef Wstrpbrk
-#define Wstrpbrk __wcspbrk
+#define Wstrpbrk wcspbrk
 
 
 #include "wstring.c"
 #include "wstring.c"