* getopt.c: Avoid useless compiler warnings.

This commit is contained in:
Corinna Vinschen 2004-02-20 23:31:47 +00:00
parent 1a57b22914
commit 12afe44527
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2004-02-20 Corinna Vinschen <corinna@vinschen.de>
* getopt.c: Avoid useless compiler warnings.
2004-02-20 Corinna Vinschen <corinna@vinschen.de> 2004-02-20 Corinna Vinschen <corinna@vinschen.de>
* getopt.c: Replace with latest vanilla(!) OpenBSD version 1.16. * getopt.c: Replace with latest vanilla(!) OpenBSD version 1.16.

View File

@ -87,7 +87,11 @@ char *optarg; /* argument associated with option */
#define BADARG ((*options == ':') ? (int)':' : (int)'?') #define BADARG ((*options == ':') ? (int)':' : (int)'?')
#define INORDER (int)1 #define INORDER (int)1
#ifdef __CYGWIN__
static char EMSG[] = "";
#else
#define EMSG "" #define EMSG ""
#endif
static int getopt_internal(int, char * const *, const char *, static int getopt_internal(int, char * const *, const char *,
const struct option *, int *, int); const struct option *, int *, int);
@ -421,7 +425,7 @@ start:
} }
if ((optchar = (int)*place++) == (int)':' || if ((optchar = (int)*place++) == (int)':' ||
optchar == (int)'-' && *place != '\0' || (optchar == (int)'-' && *place != '\0') ||
(oli = strchr(options, optchar)) == NULL) { (oli = strchr(options, optchar)) == NULL) {
/* /*
* If the user specified "-" and '-' isn't listed in * If the user specified "-" and '-' isn't listed in