diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-08-20 08:13:43 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-08-20 08:13:43 +0000 |
commit | 3da43777572aa0ff7a2a4c7e97ebf7aaedd9bfa2 (patch) | |
tree | c2256926af3801b6d5de178cbee536c16151dacb | |
parent | 910b2d598a5f7910bbfaf032fb81996fdb6cb822 (diff) | |
download | mandoc-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.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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)) { |