From 067260fcfa2038d23bd4316d0e43bc7c3fe0c7e1 Mon Sep 17 00:00:00 2001
From: Sascha Wildner <saw@online.de>
Date: Fri, 17 Feb 2017 08:56:36 +0100
Subject: [PATCH 6/7] Silence clang's -Wunused-const-variable in buildworld.

---
 bin/sh/main.c                          | 2 ++
 contrib/smbfs/mount_smbfs/getmntopts.c | 1 -
 lib/libc/isc/ev_streams.c              | 2 ++
 lib/libc/isc/ev_timers.c               | 2 ++
 lib/libc/nameser/ns_name.c             | 2 ++
 lib/libc/nameser/ns_netint.c           | 2 ++
 lib/libc/nameser/ns_parse.c            | 2 ++
 lib/libc/nameser/ns_print.c            | 2 ++
 lib/libc/nameser/ns_samedomain.c       | 2 ++
 lib/libc/nameser/ns_ttl.c              | 2 ++
 lib/libc/resolv/res_findzonecut.c      | 2 ++
 lib/libc/resolv/res_mkupdate.c         | 2 ++
 lib/libc/resolv/res_update.c           | 2 ++
 lib/libc/rpc/clnt_vc.c                 | 1 -
 sbin/ifconfig/iflagg.c                 | 6 +-----
 sbin/ifconfig/regdomain.c              | 5 ++---
 usr.bin/systat/ifstat.c                | 4 ++++
 17 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/bin/sh/main.c b/bin/sh/main.c
index 7f01d2b331..fa2ae7df71 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -31,9 +31,11 @@
  */
 
 #ifndef lint
+#if 0
 static char const copyright[] =
 "@(#) Copyright (c) 1991, 1993\n\
 	The Regents of the University of California.  All rights reserved.\n";
+#endif
 #endif /* not lint */
 
 #ifndef lint
diff --git a/contrib/smbfs/mount_smbfs/getmntopts.c b/contrib/smbfs/mount_smbfs/getmntopts.c
index 360225b7d6..1c6aa9d3a6 100644
--- a/contrib/smbfs/mount_smbfs/getmntopts.c
+++ b/contrib/smbfs/mount_smbfs/getmntopts.c
@@ -34,7 +34,6 @@
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)getmntopts.c	8.3 (Berkeley) 3/29/95";
-#else
 static const char rcsid[] =
 	"$Id: getmntopts.c,v 1.1 2000/03/29 01:26:41 bp Exp $";
 #endif
diff --git a/lib/libc/isc/ev_streams.c b/lib/libc/isc/ev_streams.c
index eefebf424c..be5d034fd4 100644
--- a/lib/libc/isc/ev_streams.c
+++ b/lib/libc/isc/ev_streams.c
@@ -20,8 +20,10 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
+#if 0
 static const char rcsid[] = "$Id: ev_streams.c,v 1.5 2005/04/27 04:56:36 sra Exp $";
 #endif
+#endif
 
 #include "port_before.h"
 #ifndef _LIBC
diff --git a/lib/libc/isc/ev_timers.c b/lib/libc/isc/ev_timers.c
index f36251a987..362ec688f6 100644
--- a/lib/libc/isc/ev_timers.c
+++ b/lib/libc/isc/ev_timers.c
@@ -20,8 +20,10 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
+#if 0
 static const char rcsid[] = "$Id: ev_timers.c,v 1.6 2005/04/27 04:56:36 sra Exp $";
 #endif
+#endif
 
 /* Import. */
 
diff --git a/lib/libc/nameser/ns_name.c b/lib/libc/nameser/ns_name.c
index 9d409f3d95..538d33d917 100644
--- a/lib/libc/nameser/ns_name.c
+++ b/lib/libc/nameser/ns_name.c
@@ -16,8 +16,10 @@
  */
 
 #ifndef lint
+#if 0
 static const char rcsid[] = "$Id: ns_name.c,v 1.10 2005/04/27 04:56:40 sra Exp $";
 #endif
+#endif
 
 #include "port_before.h"
 
diff --git a/lib/libc/nameser/ns_netint.c b/lib/libc/nameser/ns_netint.c
index 559c9d5bd5..839af7341b 100644
--- a/lib/libc/nameser/ns_netint.c
+++ b/lib/libc/nameser/ns_netint.c
@@ -16,8 +16,10 @@
  */
 
 #ifndef lint
+#if 0
 static const char rcsid[] = "$Id: ns_netint.c,v 1.3 2005/04/27 04:56:40 sra Exp $";
 #endif
+#endif
 
 /* Import. */
 
diff --git a/lib/libc/nameser/ns_parse.c b/lib/libc/nameser/ns_parse.c
index 09b19f861c..69540e4ce7 100644
--- a/lib/libc/nameser/ns_parse.c
+++ b/lib/libc/nameser/ns_parse.c
@@ -16,8 +16,10 @@
  */
 
 #ifndef lint
+#if 0
 static const char rcsid[] = "$Id: ns_parse.c,v 1.9 2007/08/27 03:32:26 marka Exp $";
 #endif
+#endif
 
 /* Import. */
 
diff --git a/lib/libc/nameser/ns_print.c b/lib/libc/nameser/ns_print.c
index 4dc20dcfc9..c57c11c243 100644
--- a/lib/libc/nameser/ns_print.c
+++ b/lib/libc/nameser/ns_print.c
@@ -16,8 +16,10 @@
  */
 
 #ifndef lint
+#if 0
 static const char rcsid[] = "$Id: ns_print.c,v 1.10 2005/04/27 04:56:40 sra Exp $";
 #endif
+#endif
 
 /* Import. */
 
diff --git a/lib/libc/nameser/ns_samedomain.c b/lib/libc/nameser/ns_samedomain.c
index ee890090b8..02b6ef37be 100644
--- a/lib/libc/nameser/ns_samedomain.c
+++ b/lib/libc/nameser/ns_samedomain.c
@@ -16,8 +16,10 @@
  */
 
 #ifndef lint
+#if 0
 static const char rcsid[] = "$Id: ns_samedomain.c,v 1.6 2005/04/27 04:56:40 sra Exp $";
 #endif
+#endif
 
 #include "port_before.h"
 
diff --git a/lib/libc/nameser/ns_ttl.c b/lib/libc/nameser/ns_ttl.c
index 69c2f83f57..b2aa517fe2 100644
--- a/lib/libc/nameser/ns_ttl.c
+++ b/lib/libc/nameser/ns_ttl.c
@@ -16,8 +16,10 @@
  */
 
 #ifndef lint
+#if 0
 static const char rcsid[] = "$Id: ns_ttl.c,v 1.4 2005/07/28 06:51:49 marka Exp $";
 #endif
+#endif
 
 /* Import. */
 
diff --git a/lib/libc/resolv/res_findzonecut.c b/lib/libc/resolv/res_findzonecut.c
index ea778dbb29..b1be13790c 100644
--- a/lib/libc/resolv/res_findzonecut.c
+++ b/lib/libc/resolv/res_findzonecut.c
@@ -1,5 +1,7 @@
 #if !defined(lint) && !defined(SABER)
+#if 0
 static const char rcsid[] = "$Id: res_findzonecut.c,v 1.10 2005/10/11 00:10:16 marka Exp $";
+#endif
 #endif /* not lint */
 
 /*
diff --git a/lib/libc/resolv/res_mkupdate.c b/lib/libc/resolv/res_mkupdate.c
index 201c1d5902..0033f886cf 100644
--- a/lib/libc/resolv/res_mkupdate.c
+++ b/lib/libc/resolv/res_mkupdate.c
@@ -22,7 +22,9 @@
  */
 
 #if !defined(lint) && !defined(SABER)
+#if 0
 static const char rcsid[] = "$Id: res_mkupdate.c,v 1.8 2005/10/14 05:44:26 marka Exp $";
+#endif
 #endif /* not lint */
 
 #include "port_before.h"
diff --git a/lib/libc/resolv/res_update.c b/lib/libc/resolv/res_update.c
index 63259e1c4d..9f868fac4c 100644
--- a/lib/libc/resolv/res_update.c
+++ b/lib/libc/resolv/res_update.c
@@ -1,5 +1,7 @@
 #if !defined(lint) && !defined(SABER)
+#if 0
 static const char rcsid[] = "$Id: res_update.c,v 1.13 2005/04/27 04:56:43 sra Exp $";
+#endif
 #endif /* not lint */
 
 /*
diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c
index a0fc02acb1..2b690c9136 100644
--- a/lib/libc/rpc/clnt_vc.c
+++ b/lib/libc/rpc/clnt_vc.c
@@ -135,7 +135,6 @@ static cond_t   *vc_cv;
 
 static const char clnt_vc_errstr[] = "%s : %s";
 static const char clnt_vc_str[] = "clnt_vc_create";
-static const char clnt_read_vc_str[] = "read_vc";
 static const char __no_mem_str[] = "out of memory";
 
 /*
diff --git a/sbin/ifconfig/iflagg.c b/sbin/ifconfig/iflagg.c
index df44f10d0e..5abbdd041f 100644
--- a/sbin/ifconfig/iflagg.c
+++ b/sbin/ifconfig/iflagg.c
@@ -1,11 +1,7 @@
 /*-
+ *$FreeBSD: head/sbin/ifconfig/iflagg.c 249897 2013-04-25 16:34:04Z glebius $
  */
 
-#ifndef lint
-static const char rcsid[] =
-  "$FreeBSD: head/sbin/ifconfig/iflagg.c 249897 2013-04-25 16:34:04Z glebius $";
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
diff --git a/sbin/ifconfig/regdomain.c b/sbin/ifconfig/regdomain.c
index eaef5f1fa3..0bdee59dac 100644
--- a/sbin/ifconfig/regdomain.c
+++ b/sbin/ifconfig/regdomain.c
@@ -21,10 +21,9 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: head/sbin/ifconfig/regdomain.c 200587 2009-12-15 20:44:12Z gavin $
  */
-#ifndef lint
-static const char rcsid[] = "$FreeBSD: head/sbin/ifconfig/regdomain.c 200587 2009-12-15 20:44:12Z gavin $";
-#endif /* not lint */
 
 #include <sys/types.h>
 #include <sys/errno.h>
diff --git a/usr.bin/systat/ifstat.c b/usr.bin/systat/ifstat.c
index 8b003ccbce..123f0c4e01 100644
--- a/usr.bin/systat/ifstat.c
+++ b/usr.bin/systat/ifstat.c
@@ -52,12 +52,16 @@
 #define C4	60		/* 60-80 */
 #define C5	80		/* Used for label positioning. */
 
+#if 0
 static const int col0 = 0;
 static const int col1 = C1;
+#endif
 static const int col2 = C2;
 static const int col3 = C3;
 static const int col4 = C4;
+#if 0
 static const int col5 = C5;
+#endif
 
 
 static SLIST_HEAD(, if_stat) curlist;
-- 
2.11.0

