diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c
index 297f07e81bd697f7f3704d8ab6deddde3464cbe1..116c923f76a8c7c3246046f80272ed57d2e28271 100644
--- a/src/plugins/select/linear/select_linear.c
+++ b/src/plugins/select/linear/select_linear.c
@@ -497,6 +497,10 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index)
 #if SELECT_DEBUG
 	info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ",
 	     node_ptr->name, cpus, boards, sockets, cores, threads);
+#else
+	/* Largely to avoid warning about unused variable "boards" */
+	debug2("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ",
+	       node_ptr->name, cpus, boards, sockets, cores, threads);
 #endif
 
 	avail_cpus = slurm_get_avail_procs(