summaryrefslogtreecommitdiffstats
path: root/mdoc_argv.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-06 09:21:24 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-06 09:21:24 +0000
commit4baed99617de2e5dacb16862a0cecb8885b435f0 (patch)
treed9f9bab848b056d01e919c484bc3c34b6516f2b1 /mdoc_argv.c
parent0624c9ad95223c7844a47eca56f838193ad71a0b (diff)
downloadmandoc-4baed99617de2e5dacb16862a0cecb8885b435f0.tar.gz
Initial removal of enum mdoc_warn from mdoc warnings (unnecessary complication).
Diffstat (limited to 'mdoc_argv.c')
-rw-r--r--mdoc_argv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mdoc_argv.c b/mdoc_argv.c
index 1d8cbcd3..40a1e38c 100644
--- a/mdoc_argv.c
+++ b/mdoc_argv.c
@@ -369,6 +369,7 @@ perr(struct mdoc *mdoc, int line, int pos, enum merr code)
p = "argument requires a value";
break;
}
+
assert(p);
return(mdoc_perr(mdoc, line, pos, p));
}
@@ -378,10 +379,9 @@ static int
pwarn(struct mdoc *mdoc, int line, int pos, enum mwarn code)
{
char *p;
- int c;
p = NULL;
- c = WARN_SYNTAX;
+
switch (code) {
case (WQUOTPARM):
p = "unexpected quoted parameter";
@@ -391,15 +391,14 @@ pwarn(struct mdoc *mdoc, int line, int pos, enum mwarn code)
break;
case (WCOLEMPTY):
p = "last list column is empty";
- c = WARN_COMPAT;
break;
case (WTAILWS):
p = "trailing whitespace";
- c = WARN_COMPAT;
break;
}
+
assert(p);
- return(mdoc_pwarn(mdoc, line, pos, c, p));
+ return(mdoc_pwarn(mdoc, line, pos, p));
}