ENH: Fix warning about assignment discards qualifiers from pointer target type
This commit is contained in:
parent
1093244d43
commit
4b3aabebd2
|
@ -45,7 +45,7 @@ int opterr = 1, /* if error message should be printed */
|
||||||
optind = 1, /* index into parent argv vector */
|
optind = 1, /* index into parent argv vector */
|
||||||
optopt, /* character checked for validity */
|
optopt, /* character checked for validity */
|
||||||
optreset; /* reset getopt */
|
optreset; /* reset getopt */
|
||||||
char *optarg; /* argument associated with option */
|
const char *optarg; /* argument associated with option */
|
||||||
|
|
||||||
#define BADCH (int)'?'
|
#define BADCH (int)'?'
|
||||||
#define BADARG (int)':'
|
#define BADARG (int)':'
|
||||||
|
@ -57,7 +57,7 @@ char *optarg; /* argument associated with option */
|
||||||
*/
|
*/
|
||||||
int getopt(int nargc, char *const *nargv, const char *ostr) {
|
int getopt(int nargc, char *const *nargv, const char *ostr) {
|
||||||
# define __progname nargv[0]
|
# define __progname nargv[0]
|
||||||
static char *place = EMSG; /* option letter processing */
|
static const char *place = EMSG; /* option letter processing */
|
||||||
char *oli; /* option letter list index */
|
char *oli; /* option letter list index */
|
||||||
|
|
||||||
if (optreset || !*place) { /* update scanning pointer */
|
if (optreset || !*place) { /* update scanning pointer */
|
||||||
|
|
Loading…
Reference in New Issue