From 3da43777572aa0ff7a2a4c7e97ebf7aaedd9bfa2 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 20 Aug 2010 08:13:43 +0000 Subject: fix previous: when bailing out due to -Wstop, skip output functions, but not *_endparse; problem reported by kristaps@ --- main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'main.c') 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)) { -- cgit