From a97cf48486226d538797ef721c62a80b9327c43f Mon Sep 17 00:00:00 2001 From: Mightyjo Date: Fri, 27 Nov 2015 21:38:23 -0500 Subject: Replaced CHAR macro with unsigned char type. Thanks to Michael McConville for pointing out that the old Char macro causes problems with static analysis. The macro has been removed and replaced with 'unsigned char' throughout the flex sources. The macro is not needed at best and was confusing at worst. It was not used in any of the example files nor was it mentioned in the manual at all. --- src/scanopt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/scanopt.c') diff --git a/src/scanopt.c b/src/scanopt.c index 4b55ed6..70c638d 100644 --- a/src/scanopt.c +++ b/src/scanopt.c @@ -173,7 +173,7 @@ scanopt_t *scanopt_init (const optspec_t *options, int argc, char **argv, int fl s->aux = (struct _aux *) malloc (s->optc * sizeof (struct _aux)); for (i = 0; i < s->optc; i++) { - const Char *p, *pname; + const unsigned char *p, *pname; const struct optspec_t *opt; struct _aux *aux; @@ -184,11 +184,11 @@ scanopt_t *scanopt_init (const optspec_t *options, int argc, char **argv, int fl if (opt->opt_fmt[0] == '-' && opt->opt_fmt[1] == '-') { aux->flags |= IS_LONG; - pname = (const Char *)(opt->opt_fmt + 2); + pname = (const unsigned char *)(opt->opt_fmt + 2); s->has_long = 1; } else { - pname = (const Char *)(opt->opt_fmt + 1); + pname = (const unsigned char *)(opt->opt_fmt + 1); s->has_short = 1; } aux->printlen = strlen (opt->opt_fmt); -- cgit v1.2.3