diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-02-20 23:31:47 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-02-20 23:31:47 +0000 |
commit | 12afe4452794da198bfb969a558fd52ff10649eb (patch) | |
tree | 640dfe3710251335566ee2b8ba11e77d2033d5e5 | |
parent | 1a57b229147012ec9df012594a6e78c62ecb9eae (diff) | |
download | newlib-12afe4452794da198bfb969a558fd52ff10649eb.zip newlib-12afe4452794da198bfb969a558fd52ff10649eb.tar.gz newlib-12afe4452794da198bfb969a558fd52ff10649eb.tar.bz2 |
* getopt.c: Avoid useless compiler warnings.
-rw-r--r-- | winsup/cygwin/ChangeLog | 4 | ||||
-rw-r--r-- | winsup/cygwin/libc/getopt.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3729f5c..a0d1c99 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,9 @@ 2004-02-20 Corinna Vinschen <corinna@vinschen.de> + * getopt.c: Avoid useless compiler warnings. + +2004-02-20 Corinna Vinschen <corinna@vinschen.de> + * getopt.c: Replace with latest vanilla(!) OpenBSD version 1.16. 2004-02-18 Christopher Faylor <cgf@redhat.com> diff --git a/winsup/cygwin/libc/getopt.c b/winsup/cygwin/libc/getopt.c index 6079ce3..0ed4631 100644 --- a/winsup/cygwin/libc/getopt.c +++ b/winsup/cygwin/libc/getopt.c @@ -87,7 +87,11 @@ char *optarg; /* argument associated with option */ #define BADARG ((*options == ':') ? (int)':' : (int)'?') #define INORDER (int)1 +#ifdef __CYGWIN__ +static char EMSG[] = ""; +#else #define EMSG "" +#endif static int getopt_internal(int, char * const *, const char *, const struct option *, int *, int); @@ -421,7 +425,7 @@ start: } if ((optchar = (int)*place++) == (int)':' || - optchar == (int)'-' && *place != '\0' || + (optchar == (int)'-' && *place != '\0') || (oli = strchr(options, optchar)) == NULL) { /* * If the user specified "-" and '-' isn't listed in |