aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/main.c
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
commit223727dbba0bff013b3bacc8607570b2b41667c1 (patch)
treec64d140143e848423e96c97f0d7b6eaf2bc2b716 /main.c
parent1082451355936bbbae957af14276bb2805f5e8dd (diff)
downloadmandoc-223727dbba0bff013b3bacc8607570b2b41667c1.tar.gz
mandoc-223727dbba0bff013b3bacc8607570b2b41667c1.tar.zst
mandoc-223727dbba0bff013b3bacc8607570b2b41667c1.zip
fix previous: when bailing out due to -Wstop,
skip output functions, but not *_endparse; problem reported by kristaps@
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/main.c b/main.c
index 1e635fe2..044ec79f 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.103 2010/08/20 01:02:07 schwarze Exp $ */
+/* $Id: main.c,v 1.104 2010/08/20 08:13:43 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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)) {