Re: getopt.3 / getopt_long.3: Remove NOTREACHED comment as per style(9)

2016-01-04 Thread Theo Buehler
On Mon, Jan 04, 2016 at 11:48:10AM +, Juuso Lapinlampi wrote:
> Here's a revised patch that updates the $Mdocdate if seemed necessary.

Thanks.  I like the first version of your patch, it's a good point.

There's no need to update $Mdocdate$ manually.  This is taken care of
when the patch is committed.  See the section `Keyword Substitution' in
rcs(1).

> Ok?
> 
> Index: getopt.3
> ===
> RCS file: /cvs/src/lib/libc/stdlib/getopt.3,v
> retrieving revision 1.44
> diff -u -p -r1.44 getopt.3
> --- getopt.3  21 Jan 2014 03:15:45 -  1.44
> +++ getopt.3  4 Jan 2016 11:45:47 -
> @@ -27,7 +27,7 @@
>  .\"
>  .\"  $OpenBSD: getopt.3,v 1.44 2014/01/21 03:15:45 schwarze Exp $
>  .\"
> -.Dd $Mdocdate: January 21 2014 $
> +.Dd $Mdocdate: January 4 2016 $
>  .Dt GETOPT 3
>  .Os
>  .Sh NAME
> @@ -183,7 +183,6 @@ while ((ch = getopt(argc, argv, "bf:")) 
>   break;
>   default:
>   usage();
> - /* NOTREACHED */
>   }
>  }
>  argc -= optind;
> Index: getopt_long.3
> ===
> RCS file: /cvs/src/lib/libc/stdlib/getopt_long.3,v
> retrieving revision 1.20
> diff -u -p -r1.20 getopt_long.3
> --- getopt_long.3 5 Jun 2013 03:39:23 -   1.20
> +++ getopt_long.3 4 Jan 2016 11:45:47 -
> @@ -30,7 +30,7 @@
>  .\"
>  .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95
>  .\"
> -.Dd $Mdocdate: June 5 2013 $
> +.Dd $Mdocdate: January 4 2016 $
>  .Dt GETOPT_LONG 3
>  .Os
>  .Sh NAME
> @@ -420,7 +420,6 @@ while ((ch = getopt_long(argc, argv, "bf
>   break;
>   default:
>   usage();
> - /* NOTREACHED */
>   }
>  argc -= optind;
>  argv += optind;
> 



Re: getopt.3 / getopt_long.3: Remove NOTREACHED comment as per style(9)

2016-01-04 Thread Juuso Lapinlampi
Here's a revised patch that updates the $Mdocdate if seemed necessary.

Ok?

Index: getopt.3
===
RCS file: /cvs/src/lib/libc/stdlib/getopt.3,v
retrieving revision 1.44
diff -u -p -r1.44 getopt.3
--- getopt.321 Jan 2014 03:15:45 -  1.44
+++ getopt.34 Jan 2016 11:45:47 -
@@ -27,7 +27,7 @@
 .\"
 .\"$OpenBSD: getopt.3,v 1.44 2014/01/21 03:15:45 schwarze Exp $
 .\"
-.Dd $Mdocdate: January 21 2014 $
+.Dd $Mdocdate: January 4 2016 $
 .Dt GETOPT 3
 .Os
 .Sh NAME
@@ -183,7 +183,6 @@ while ((ch = getopt(argc, argv, "bf:")) 
break;
default:
usage();
-   /* NOTREACHED */
}
 }
 argc -= optind;
Index: getopt_long.3
===
RCS file: /cvs/src/lib/libc/stdlib/getopt_long.3,v
retrieving revision 1.20
diff -u -p -r1.20 getopt_long.3
--- getopt_long.3   5 Jun 2013 03:39:23 -   1.20
+++ getopt_long.3   4 Jan 2016 11:45:47 -
@@ -30,7 +30,7 @@
 .\"
 .\" @(#)getopt.3   8.5 (Berkeley) 4/27/95
 .\"
-.Dd $Mdocdate: June 5 2013 $
+.Dd $Mdocdate: January 4 2016 $
 .Dt GETOPT_LONG 3
 .Os
 .Sh NAME
@@ -420,7 +420,6 @@ while ((ch = getopt_long(argc, argv, "bf
break;
default:
usage();
-   /* NOTREACHED */
}
 argc -= optind;
 argv += optind;



getopt.3 / getopt_long.3: Remove NOTREACHED comment as per style(9)

2016-01-04 Thread Juuso Lapinlampi
style(9) revision 1.61 updated the guidelines, and mentions the only 
lint-style comment that should be used is FALLTHROUGH.

Ok?

Index: getopt.3
===
RCS file: /cvs/src/lib/libc/stdlib/getopt.3,v
retrieving revision 1.44
diff -u -p -u -r1.44 getopt.3
--- getopt.321 Jan 2014 03:15:45 -  1.44
+++ getopt.34 Jan 2016 11:29:45 -
@@ -183,7 +183,6 @@ while ((ch = getopt(argc, argv, "bf:")) 
break;
default:
usage();
-   /* NOTREACHED */
}
 }
 argc -= optind;
Index: getopt_long.3
===
RCS file: /cvs/src/lib/libc/stdlib/getopt_long.3,v
retrieving revision 1.20
diff -u -p -u -r1.20 getopt_long.3
--- getopt_long.3   5 Jun 2013 03:39:23 -   1.20
+++ getopt_long.3   4 Jan 2016 11:29:45 -
@@ -420,7 +420,6 @@ while ((ch = getopt_long(argc, argv, "bf
break;
default:
usage();
-   /* NOTREACHED */
}
 argc -= optind;
 argv += optind;