summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_validate.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-07-02 11:42:56 +0000
committerschwarze <schwarze@openbsd.org>2014-07-02 11:42:56 +0000
commitb723eac25f27f55db5e6cc040cc34fc79ae9f759 (patch)
tree200f3cf1db045660e53faf0553ef82ed86fe57d6 /usr.bin/mandoc/mdoc_validate.c
parentthis doesnt talk to uvm directly, so doesnt need uvm_extern.h (diff)
downloadwireguard-openbsd-b723eac25f27f55db5e6cc040cc34fc79ae9f759.tar.xz
wireguard-openbsd-b723eac25f27f55db5e6cc040cc34fc79ae9f759.zip
Clean up warnings related to macros and nesting.
* Hierarchical naming of enum mandocerr items. * Improve the wording to make it comprehensible. * Mention the offending macro. * Garbage collect one chunk of ancient, long unreachable code.
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r--usr.bin/mandoc/mdoc_validate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index 48bc9fc86f9..83c45f34cd1 100644
--- a/usr.bin/mandoc/mdoc_validate.c
+++ b/usr.bin/mandoc/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.137 2014/07/02 05:51:49 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.138 2014/07/02 11:42:56 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -587,7 +587,9 @@ pre_display(PRE_ARGS)
break;
if (node)
- mdoc_nmsg(mdoc, n, MANDOCERR_NESTEDDISP);
+ mandoc_vmsg(MANDOCERR_BD_NEST,
+ mdoc->parse, n->line, n->pos,
+ "%s in Bd", mdoc_macronames[n->tok]);
return(1);
}
@@ -1899,7 +1901,7 @@ post_ns(POST_ARGS)
{
if (MDOC_LINE & mdoc->last->flags)
- mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_IGNNS);
+ mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NS_SKIP);
return(1);
}