diff options
author | Mightyjo <mightyjo@gmail.com> | 2015-11-27 21:38:23 -0500 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2015-11-29 17:20:22 -0500 |
commit | a97cf48486226d538797ef721c62a80b9327c43f (patch) | |
tree | 9744e98330df3c31dbeced82f7ad128bb5268221 /src/scanopt.c | |
parent | 45db9033fefa30cdc263db6ede60807da7da89c5 (diff) |
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.
Diffstat (limited to 'src/scanopt.c')
-rw-r--r-- | src/scanopt.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |