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)
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to