diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-08-20 08:13:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-08-20 08:13:04 +0000 |
commit | 3879624cbd3629fb6a4cb100aadfef02b91a86bc (patch) | |
tree | caac7945b9cb1e78ea2da1638b7c0fe1cb9c21f4 | |
parent | b66395951b72dc01c1c701741ca3b581704079c1 (diff) |
fix previous: when bailing out due to -Wstop,
skip output functions, but not *_endparse;
problem reported by kristaps@
-rw-r--r-- | usr.bin/mandoc/main.c | 18 |
1 files changed, 9 insertions, 9 deletions
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 <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -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)) { |