diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-12-22 09:50:38 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2004-12-22 09:50:38 +0000 |
commit | 41b2b676f5a327f5c356f9997fecc295fb01c673 (patch) | |
tree | 522f155887caff8c4f1704ded4a2230a010e08ae /lib/argp-parse.c | |
parent | 6fd809003c6562b6436213f77aab05065c67a5db (diff) | |
download | gnulib-41b2b676f5a327f5c356f9997fecc295fb01c673.tar.gz |
(parser_init): Avoid arithmetics on void pointers.
Diffstat (limited to 'lib/argp-parse.c')
-rw-r--r-- | lib/argp-parse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/argp-parse.c b/lib/argp-parse.c index 9195b87a77..8b89354d4e 100644 --- a/lib/argp-parse.c +++ b/lib/argp-parse.c @@ -482,9 +482,9 @@ parser_init (struct parser *parser, const struct argp *argp, return ENOMEM; parser->groups = parser->storage; - parser->child_inputs = parser->storage + GLEN; - parser->long_opts = parser->storage + GLEN + CLEN; - parser->short_opts = parser->storage + GLEN + CLEN + LLEN; + parser->child_inputs = (void **)((char*) parser->storage + GLEN); + parser->long_opts = (struct option *)((char*) parser->storage + GLEN + CLEN); + parser->short_opts = (char*) parser->storage + GLEN + CLEN + LLEN; parser->opt_data = opt_data; memset (parser->child_inputs, 0, szs.num_child_inputs * sizeof (void *)); |