From 5e956f114819294e03166e6c66128feb6e0571a2 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Tue, 31 Mar 2015 09:25:51 +0100 Subject: [PATCH] Make place const to avoid a warning, from Ben Boeckel. --- compat/getopt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compat/getopt.c b/compat/getopt.c index a93f368a..03ad9e80 100644 --- a/compat/getopt.c +++ b/compat/getopt.c @@ -52,7 +52,7 @@ char *BSDoptarg; /* argument associated with option */ int BSDgetopt(int nargc, char *const *nargv, const char *ostr) { - static char *place = EMSG; /* option letter processing */ + static const char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (ostr == NULL) @@ -105,7 +105,7 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr) __progname, BSDoptopt); return (BADCH); } - else /* white space */ + else /* white space */ BSDoptarg = nargv[BSDoptind]; place = EMSG; ++BSDoptind;