camcontrol(8): Remove some unused variables.
authorSascha Wildner <saw@online.de>
Tue, 16 Oct 2012 07:48:42 +0000 (09:48 +0200)
committerSascha Wildner <saw@online.de>
Tue, 16 Oct 2012 08:26:04 +0000 (10:26 +0200)
Found-by: gcc47
sbin/camcontrol/camcontrol.c
sbin/camcontrol/modeedit.c

index f9cea04..19268c6 100644 (file)
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.21.2.13 2003/01/08 17:55:02 njl Exp $
- * $DragonFly: src/sbin/camcontrol/camcontrol.c,v 1.13 2008/04/20 13:44:24 swildner Exp $
  */
 
 #include <sys/ioctl.h>
@@ -2762,7 +2761,6 @@ ratecontrol(struct cam_device *device, int retry_count, int timeout,
 
                if (spi && syncrate != -1) {
                        int prelim_sync_period;
-                       u_int __unused freq;
 
                        if ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) {
                                warnx("HBA at %s%d is not cable of changing "
@@ -2793,7 +2791,6 @@ ratecontrol(struct cam_device *device, int retry_count, int timeout,
                        spi->sync_period =
                                scsi_calc_syncparam(prelim_sync_period);
 
-                       freq = scsi_calc_syncsrate(spi->sync_period);
                        didsettings++;
                }
 
@@ -3377,14 +3374,12 @@ retry:
                                        RPL_LUNDATA_LUN_LUN_MASK);
                                break;
                        case RPL_LUNDATA_ATYP_EXTLUN: {
-                               int __unused field_len;
                                int field_len_code, eam_code;
 
                                eam_code = lundata->luns[i].lundata[j] &
                                        RPL_LUNDATA_EXT_EAM_MASK;
                                field_len_code = (lundata->luns[i].lundata[j] &
                                        RPL_LUNDATA_EXT_LEN_MASK) >> 4;
-                               field_len = field_len_code * 2;
                
                                if ((eam_code == RPL_LUNDATA_EXT_EAM_WK)
                                 && (field_len_code == 0x00)) {
index e749731..2b75ab6 100644 (file)
@@ -26,7 +26,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sbin/camcontrol/modeedit.c,v 1.5.2.2 2003/01/08 17:55:02 njl Exp $
- * $DragonFly: src/sbin/camcontrol/modeedit.c,v 1.3 2005/01/11 23:58:55 cpressey Exp $
  */
 
 #include <sys/queue.h>
@@ -864,7 +863,6 @@ mode_list(struct cam_device *device, int page_control, int dbd,
          int retry_count, int timeout)
 {
        u_int8_t data[MAX_COMMAND_SIZE];/* Buffer to hold sense data. */
-       u_int8_t __unused *mode_pars;   /* Pointer to modepage params. */
        struct scsi_mode_header_6 *mh;  /* Location of mode header. */
        struct scsi_mode_page_header *mph;
        struct pagename *nameentry;
@@ -890,7 +888,6 @@ mode_list(struct cam_device *device, int page_control, int dbd,
                /* Locate the next mode page header. */
                mph = (struct scsi_mode_page_header *)
                    ((intptr_t)mh + sizeof(*mh) + len);
-               mode_pars = MODE_PAGE_DATA(mph);
 
                mph->page_code &= SMS_PAGE_CODE;
                nameentry = nameentry_lookup(mph->page_code);