From 3879624cbd3629fb6a4cb100aadfef02b91a86bc Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 20 Aug 2010 08:13:04 +0000 Subject: fix previous: when bailing out due to -Wstop, skip output functions, but not *_endparse; problem reported by kristaps@ --- usr.bin/mandoc/main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'usr.bin/mandoc/main.c') diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index 73620753e66..4a2159b7d9a 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.45 2010/08/20 00:53:35 schwarze Exp $ */ +/* $Id: main.c,v 1.46 2010/08/20 08:13:03 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -536,14 +536,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)) { @@ -567,6 +559,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 v1.2.3