Avoid more compiler warnings.
* libc/stdlib/btowc.c: Add missing header. * libc/stdlib/getopt.c (getopt_internal): Initialize variable. * libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration. * libc/stdlib/wctob.c: Add missing header. * libc/string/strcpy.c (strcpy): Avoid warnings. * libc/string/strrchr.c (strrchr): Likewise.
This commit is contained in:
parent
ad4e943fca
commit
b206478328
|
@ -1,3 +1,13 @@
|
|||
2007-05-29 Eric Blake <ebb9@byu.net>
|
||||
|
||||
Avoid more compiler warnings.
|
||||
* libc/stdlib/btowc.c: Add missing header.
|
||||
* libc/stdlib/getopt.c (getopt_internal): Initialize variable.
|
||||
* libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration.
|
||||
* libc/stdlib/wctob.c: Add missing header.
|
||||
* libc/string/strcpy.c (strcpy): Avoid warnings.
|
||||
* libc/string/strrchr.c (strrchr): Likewise.
|
||||
|
||||
2007-05-29 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* libc/argz/argz_add_sep.c (argz_add_sep): Handle empty string
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <reent.h>
|
||||
#include <string.h>
|
||||
|
||||
wint_t
|
||||
btowc (int c)
|
||||
|
|
|
@ -153,7 +153,7 @@ getopt_internal (int argc, char *const argv[], const char *shortopts,
|
|||
char *possible_arg = NULL;
|
||||
int longopt_match = -1;
|
||||
int has_arg = -1;
|
||||
char *cp;
|
||||
char *cp = NULL;
|
||||
int arg_next = 0;
|
||||
|
||||
/* first, deal with silly parameters and easy stuff */
|
||||
|
|
|
@ -179,6 +179,7 @@ do_system (ptr, s)
|
|||
return -1;
|
||||
else
|
||||
{
|
||||
extern int _wait (int *);
|
||||
int rc = _wait (&status);
|
||||
if (rc == -1)
|
||||
return -1;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <wchar.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int
|
||||
wctob (wint_t c)
|
||||
|
|
|
@ -92,7 +92,7 @@ _DEFUN (strcpy, (dst0, src0),
|
|||
src = (char*)aligned_src;
|
||||
}
|
||||
|
||||
while (*dst++ = *src++)
|
||||
while ((*dst++ = *src++))
|
||||
;
|
||||
return dst0;
|
||||
#endif /* not PREFER_SIZE_OVER_SPEED */
|
||||
|
|
|
@ -44,7 +44,7 @@ _DEFUN (strrchr, (s, i),
|
|||
|
||||
if (i)
|
||||
{
|
||||
while (s=strchr(s, i))
|
||||
while ((s=strchr(s, i)))
|
||||
{
|
||||
last = s;
|
||||
s++;
|
||||
|
|
Loading…
Reference in New Issue