From 32599943addfd247dbba709f903f8ce4aa50fecf Mon Sep 17 00:00:00 2001 From: Vasily Khoruzhick Date: Sat, 20 Oct 2012 12:28:31 +0300 Subject: [PATCH 3/6] UPEKSONLY: driver cleanup Fix warnings reported by gcc --- libfprint/drivers/upeksonly.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libfprint/drivers/upeksonly.c b/libfprint/drivers/upeksonly.c index 6ca9706..50df8ca 100644 --- a/libfprint/drivers/upeksonly.c +++ b/libfprint/drivers/upeksonly.c @@ -467,7 +467,6 @@ static void write_regs_finished(struct write_regs_data *wrdata, int result) static void write_regs_iterate(struct write_regs_data *wrdata) { - struct fpi_ssm *ssm; struct libusb_control_setup *setup; const struct sonly_regwrite *regwrite; int r; @@ -478,7 +477,6 @@ static void write_regs_iterate(struct write_regs_data *wrdata) } regwrite = &wrdata->regs[wrdata->regs_written]; - ssm = wrdata->ssm; fp_dbg("set %02x=%02x", regwrite->reg, regwrite->value); setup = libusb_control_transfer_get_setup(wrdata->transfer); @@ -1019,9 +1017,6 @@ static void initsm_2016_run_state(struct fpi_ssm *ssm) static void initsm_1000_run_state(struct fpi_ssm *ssm) { - struct fp_img_dev *dev = ssm->priv; - struct sonly_dev *sdev = dev->priv; - switch (ssm->cur_state) { case INITSM_1000_WRITEV_1: sm_write_regs(ssm, initsm_1000_writev_1, G_N_ELEMENTS(initsm_1000_writev_1)); @@ -1183,7 +1178,7 @@ static void initsm_complete(struct fpi_ssm *ssm) static int dev_activate(struct fp_img_dev *dev, enum fp_imgdev_state state) { struct sonly_dev *sdev = dev->priv; - struct fpi_ssm *ssm; + struct fpi_ssm *ssm = NULL; int i; sdev->deactivating = FALSE; -- 1.7.12.4