Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2018 04:14:01 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r333845 - head/sys/kern
Message-ID:  <201805190414.w4J4E1t2027122@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmacy
Date: Sat May 19 04:14:00 2018
New Revision: 333845
URL: https://svnweb.freebsd.org/changeset/base/333845

Log:
  cpuset_thread0: avoid unused assignment on non debug build

Modified:
  head/sys/kern/kern_cpuset.c

Modified: head/sys/kern/kern_cpuset.c
==============================================================================
--- head/sys/kern/kern_cpuset.c	Sat May 19 04:13:20 2018	(r333844)
+++ head/sys/kern/kern_cpuset.c	Sat May 19 04:14:00 2018	(r333845)
@@ -1385,8 +1385,10 @@ struct cpuset *
 cpuset_thread0(void)
 {
 	struct cpuset *set;
-	int error;
 	int i;
+#ifdef INVARIANTS
+	int error;
+#endif
 
 	cpuset_zone = uma_zcreate("cpuset", sizeof(struct cpuset), NULL, NULL,
 	    NULL, NULL, UMA_ALIGN_CACHE, 0);
@@ -1411,14 +1413,14 @@ cpuset_thread0(void)
 	 * Now derive a default (1), modifiable set from that to give out.
 	 */
 	set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-	error = _cpuset_create(set, cpuset_zero, NULL, NULL, 1);
+	DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 1));
 	KASSERT(error == 0, ("Error creating default set: %d\n", error));
 	cpuset_default = set;
 	/*
 	 * Create the kernel set (2).
 	 */
 	set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
-	error = _cpuset_create(set, cpuset_zero, NULL, NULL, 2);
+	DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 2));
 	KASSERT(error == 0, ("Error creating kernel set: %d\n", error));
 	set->cs_domain = &domainset2;
 	cpuset_kernel = set;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805190414.w4J4E1t2027122>