Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jul 2016 04:58:42 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302363 - head/usr.sbin/bhyve
Message-ID:  <201607060458.u664wg9N033525@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Jul  6 04:58:42 2016
New Revision: 302363
URL: https://svnweb.freebsd.org/changeset/base/302363

Log:
  Fix gcc warnings
  
  Put cfl/prdt under AHCI_DEBUG #defines as they are only used in
  those cases.
  
  Approved by: re (gjb)
  Differential Revision: https://reviews.freebsd.org/D7119
  MFC after: 1 week
  Reported by: Jenkins
  Reviewed by: grehan (maintainer)
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/usr.sbin/bhyve/pci_ahci.c

Modified: head/usr.sbin/bhyve/pci_ahci.c
==============================================================================
--- head/usr.sbin/bhyve/pci_ahci.c	Wed Jul  6 04:56:45 2016	(r302362)
+++ head/usr.sbin/bhyve/pci_ahci.c	Wed Jul  6 04:58:42 2016	(r302363)
@@ -1717,19 +1717,25 @@ static void
 ahci_handle_slot(struct ahci_port *p, int slot)
 {
 	struct ahci_cmd_hdr *hdr;
+#ifdef AHCI_DEBUG
 	struct ahci_prdt_entry *prdt;
+#endif
 	struct pci_ahci_softc *sc;
 	uint8_t *cfis;
+#ifdef AHCI_DEBUG
 	int cfl;
+#endif
 
 	sc = p->pr_sc;
 	hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE);
+#ifdef AHCI_DEBUG
 	cfl = (hdr->flags & 0x1f) * 4;
+#endif
 	cfis = paddr_guest2host(ahci_ctx(sc), hdr->ctba,
 			0x80 + hdr->prdtl * sizeof(struct ahci_prdt_entry));
+#ifdef AHCI_DEBUG
 	prdt = (struct ahci_prdt_entry *)(cfis + 0x80);
 
-#ifdef AHCI_DEBUG
 	DPRINTF("\ncfis:");
 	for (i = 0; i < cfl; i++) {
 		if (i % 10 == 0)



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