diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-12 23:44:01 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-12 23:44:01 +0000 |
commit | 52d7310046ed681359f13df2dcc2b69c190b959f (patch) | |
tree | 1cea1756072c767e9985ac62e71391c5cbf3704a | |
parent | 7ec606213a9c427691d100817cf9222e8acae916 (diff) | |
download | mandoc-52d7310046ed681359f13df2dcc2b69c190b959f.tar.gz |
Lint fixes: remove unused function variables and pass in proper enum
values instead of ints.
-rw-r--r-- | mdoc_argv.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c index e6f105e1..efb23ccc 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -50,8 +50,7 @@ enum argvflag { static enum mdocargt argv_a2arg(enum mdoct, const char *); static enum margserr args(struct mdoc *, int, int *, char *, enum argsflag, char **); -static int args_checkpunct(struct mdoc *, - const char *, int, int); +static int args_checkpunct(const char *, int); static int argv(struct mdoc *, int, struct mdoc_argv *, int *, char *); static int argv_single(struct mdoc *, int, @@ -445,7 +444,7 @@ args(struct mdoc *m, int line, int *pos, *v = &buf[*pos]; if (ARGSFL_DELIM == fl) - if (args_checkpunct(m, buf, *pos, line)) + if (args_checkpunct(buf, *pos)) return(ARGS_PUNCT); /* @@ -571,7 +570,7 @@ args(struct mdoc *m, int line, int *pos, * whitespace may separate these tokens. */ static int -args_checkpunct(struct mdoc *m, const char *buf, int i, int ln) +args_checkpunct(const char *buf, int i) { int j; char dbuf[DELIMSZ]; @@ -670,7 +669,7 @@ argv_multi(struct mdoc *m, int line, for (v->sz = 0; ; v->sz++) { if ('-' == buf[*pos]) break; - ac = args(m, line, pos, buf, 0, &p); + ac = args(m, line, pos, buf, ARGSFL_NONE, &p); if (ARGS_ERROR == ac) return(0); else if (ARGS_EOLN == ac) @@ -696,7 +695,7 @@ argv_opt_single(struct mdoc *m, int line, if ('-' == buf[*pos]) return(1); - ac = args(m, line, pos, buf, 0, &p); + ac = args(m, line, pos, buf, ARGSFL_NONE, &p); if (ARGS_ERROR == ac) return(0); if (ARGS_EOLN == ac) @@ -722,7 +721,7 @@ argv_single(struct mdoc *m, int line, ppos = *pos; - ac = args(m, line, pos, buf, 0, &p); + ac = args(m, line, pos, buf, ARGSFL_NONE, &p); if (ARGS_EOLN == ac) { mdoc_pmsg(m, line, ppos, MANDOCERR_SYNTARGVCOUNT); return(0); |