diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-26 15:40:29 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2015-09-26 15:40:29 +0000 |
commit | 48c54f7bf376c428e29fcdd3f87403b3a5cb1683 (patch) | |
tree | 0ea98c052235a1f50debfe749036a66eea0d9d8f /share | |
parent | ef1de901df67a5a5f62d16a6e4efc4433a792dd8 (diff) |
Update guidelines for lint-style comments
ok krw@, schwarze@, jmc@, millert@, tedu@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/style.9 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9 index ad5cd4c0ee7..52d1794f65c 100644 --- a/share/man/man9/style.9 +++ b/share/man/man9/style.9 @@ -22,9 +22,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: style.9,v 1.60 2015/09/23 17:49:16 tedu Exp $ +.\" $OpenBSD: style.9,v 1.61 2015/09/26 15:40:28 guenther Exp $ .\" -.Dd $Mdocdate: September 23 2015 $ +.Dd $Mdocdate: September 26 2015 $ .Dt STYLE 9 .Os .Sh NAME @@ -263,7 +263,6 @@ call and the switch statement, unless parts of the switch cascade. Elements in a switch statement that cascade should have a FALLTHROUGH comment. Numerical arguments should be checked for accuracy. -Code that cannot be reached should have a NOTREACHED comment. .Bd -literal -offset indent while ((ch = getopt(argc, argv, "abn:")) != -1) switch (ch) { /* Indent the switch. */ @@ -282,7 +281,6 @@ while ((ch = getopt(argc, argv, "abn:")) != -1) break; default: usage(); - /* NOTREACHED */ } argc -= optind; argv += optind; @@ -615,6 +613,10 @@ Whenever possible, code should be run through a code checker (e.g., .Dq Li gcc -Wall -W -Wpointer-arith -Wbad-function-cast ...\& or splint from the ports tree) and produce minimal warnings. +Since lint has been removed, the only lint-style comment that should +be used is FALLTHROUGH, as it's useful to humans. +Other lint-style comments such as ARGSUSED, LINTED, NOTREACHED, and +PRINTFLIKE may be deleted. .Pp Note that documentation follows its own style guide, as documented in |