-Wall cleanups, handle unknown cases.

Submitted by:	billf, ken
Reviewed by:	ken
This commit is contained in:
Bill Fumerola 1999-09-26 21:44:16 +00:00
parent 2ce3df4e05
commit cdf41ea250
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51691

View File

@ -958,7 +958,6 @@ dorescan_or_reset(int argc, char **argv, int rescan)
"you must specify a bus, or a bus:target:lun to %s";
int rv, error = 0;
int bus = -1, target = -1, lun = -1;
char *tstr, *tmpstr = NULL;
if (argc < 3) {
warnx(must, rescan? "rescan" : "reset");
@ -2031,7 +2030,6 @@ cts_print(struct cam_device *device, struct ccb_trans_settings *cts)
if (cts->sync_offset != 0) {
u_int freq;
u_int speed;
freq = scsi_calc_syncsrate(cts->sync_period);
fprintf(stdout, "%sfrequencey: %d.%03dMHz\n", pathstr,
@ -2153,6 +2151,9 @@ cpi_print(struct ccb_pathinq *cpi)
case PI_SOFT_RST:
str = "soft reset alternative";
break;
default:
str = "unknown PI bit set";
break;
}
fprintf(stdout, "%s\n", str);
}
@ -2179,6 +2180,9 @@ cpi_print(struct ccb_pathinq *cpi)
str = "user has disabled initial BUS RESET or"
" controller is in target/mixed mode";
break;
default:
str = "unknown PIM bit set";
break;
}
fprintf(stdout, "%s\n", str);
}
@ -2209,6 +2213,9 @@ cpi_print(struct ccb_pathinq *cpi)
case PIT_GRP_7:
str = "group 7 commands in target mode";
break;
default:
str = "unknown PIT bit set";
break;
}
fprintf(stdout, "%s\n", str);
@ -2459,11 +2466,8 @@ ratecontrol(struct cam_device *device, int retry_count, int timeout,
ccb->cts.valid &= ~CCB_TRANS_SYNC_OFFSET_VALID;
if (syncrate != -1) {
int num_syncrates;
int prelim_sync_period;
int period_factor_set = 0;
u_int freq;
int i;
if ((cpi.hba_inquiry & PI_SDTR_ABLE) == 0) {
warnx("HBA at %s%d is not cable of changing "