summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-08-20 08:13:43 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-08-20 08:13:43 +0000
commit3da43777572aa0ff7a2a4c7e97ebf7aaedd9bfa2 (patch)
treec2256926af3801b6d5de178cbee536c16151dacb
parent910b2d598a5f7910bbfaf032fb81996fdb6cb822 (diff)
downloadmandoc-3da43777572aa0ff7a2a4c7e97ebf7aaedd9bfa2.tar.gz
fix previous: when bailing out due to -Wstop,
skip output functions, but not *_endparse; problem reported by kristaps@
-rw-r--r--main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.c b/main.c
index 7dfc8d9e..aaccc399 100644
--- a/main.c
+++ b/main.c
@@ -551,14 +551,6 @@ fdesc(struct curparse *curp)
}
}
- /*
- * With -Wstop and warnings or errors of at least
- * the requested level, do not produce output.
- */
-
- if (MANDOCLEVEL_OK != exit_status && curp->wstop)
- goto cleanup;
-
/* NOTE a parser may not have been assigned, yet. */
if ( ! (man || mdoc)) {
@@ -582,6 +574,14 @@ fdesc(struct curparse *curp)
goto cleanup;
}
+ /*
+ * With -Wstop and warnings or errors of at least
+ * the requested level, do not produce output.
+ */
+
+ if (MANDOCLEVEL_OK != exit_status && curp->wstop)
+ goto cleanup;
+
/* If unset, allocate output dev now (if applicable). */
if ( ! (curp->outman && curp->outmdoc)) {