From 1bfcbfc81e12d1d3cf9b29a6f072476d219b27ef Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 11 Jun 2011 23:27:20 +0000 Subject: [PATCH] fix new set-but-unused warnings noticed with gcc-4.6 git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1908 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- urjtag/ChangeLog | 6 ++++++ urjtag/src/bus/bf518f_ezbrd.c | 2 -- urjtag/src/bus/bf537_stamp.c | 2 -- urjtag/src/bus/bf561_ezkit.c | 2 -- urjtag/src/svf/svf.c | 4 +--- urjtag/src/tap/cable/gpio.c | 3 +-- urjtag/src/tap/cable/ice100.c | 7 ------- 7 files changed, 8 insertions(+), 18 deletions(-) diff --git a/urjtag/ChangeLog b/urjtag/ChangeLog index f9104ffa..ea250a3d 100644 --- a/urjtag/ChangeLog +++ b/urjtag/ChangeLog @@ -1,3 +1,9 @@ +2011-06-11 Mike Frysinger + + * src/bus/bf518f_ezbrd.c, src/bus/bf537_stamp.c, src/bus/bf561_ezkit.c, + src/svf/svf.c, src/tap/cable/gpio.c, src/tap/cable/ice100.c: Fix set + but not used warnings with gcc-4.6. + 2011-05-10 Mike Frysinger * src/tap/usbconn/libftdi.c (usbconn_ftdi_common_open): Use the new interface diff --git a/urjtag/src/bus/bf518f_ezbrd.c b/urjtag/src/bus/bf518f_ezbrd.c index 484e02a3..9cc87019 100644 --- a/urjtag/src/bus/bf518f_ezbrd.c +++ b/urjtag/src/bus/bf518f_ezbrd.c @@ -34,14 +34,12 @@ bf518f_ezbrd_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, const urj_param_t *cmd_params[]) { urj_bus_t *bus; - urj_part_t *part; bfin_bus_params_t *params; int failed = 0; bus = urj_bus_generic_new (chain, driver, sizeof (bus_params_t)); if (bus == NULL) return NULL; - part = bus->part; params = bus->params; params->async_size = 4 * 1024 * 1024; diff --git a/urjtag/src/bus/bf537_stamp.c b/urjtag/src/bus/bf537_stamp.c index 39bb87b9..b11428d7 100644 --- a/urjtag/src/bus/bf537_stamp.c +++ b/urjtag/src/bus/bf537_stamp.c @@ -34,14 +34,12 @@ bf537_stamp_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, const urj_param_t *cmd_params[]) { urj_bus_t *bus; - urj_part_t *part; bfin_bus_params_t *params; int failed = 0; bus = urj_bus_generic_new (chain, driver, sizeof (bus_params_t)); if (bus == NULL) return NULL; - part = bus->part; params = bus->params; params->async_size = 4 * 1024 * 1024; diff --git a/urjtag/src/bus/bf561_ezkit.c b/urjtag/src/bus/bf561_ezkit.c index 5e0a850a..b30ba87e 100644 --- a/urjtag/src/bus/bf561_ezkit.c +++ b/urjtag/src/bus/bf561_ezkit.c @@ -34,14 +34,12 @@ bf561_ezkit_bus_new (urj_chain_t *chain, const urj_bus_driver_t *driver, const urj_param_t *cmd_params[]) { urj_bus_t *bus; - urj_part_t *part; bfin_bus_params_t *params; int failed = 0; bus = urj_bus_generic_new (chain, driver, sizeof (bus_params_t)); if (bus == NULL) return NULL; - part = bus->part; params = bus->params; params->async_size = 64 * 1024 * 1024; diff --git a/urjtag/src/svf/svf.c b/urjtag/src/svf/svf.c index ff2cec88..9552a6d4 100644 --- a/urjtag/src/svf/svf.c +++ b/urjtag/src/svf/svf.c @@ -539,9 +539,7 @@ static int urj_svf_all_care (char **string, double number) { char *ptr; - int num, result; - - result = 1; + int num; num = (int) number; num = num % 4 == 0 ? num / 4 : num / 4 + 1; diff --git a/urjtag/src/tap/cable/gpio.c b/urjtag/src/tap/cable/gpio.c index edb88174..2dbfeb85 100644 --- a/urjtag/src/tap/cable/gpio.c +++ b/urjtag/src/tap/cable/gpio.c @@ -61,7 +61,6 @@ typedef struct { static int gpio_export (unsigned int gpio, int export) { - int ret; char *fname; FILE *fp; @@ -77,7 +76,7 @@ static int gpio_export (unsigned int gpio, int export) return URJ_STATUS_FAIL; } - ret = fprintf (fp, "%u", gpio); + fprintf (fp, "%u", gpio); fclose (fp); return URJ_STATUS_OK; diff --git a/urjtag/src/tap/cable/ice100.c b/urjtag/src/tap/cable/ice100.c index 862d1081..85062f23 100644 --- a/urjtag/src/tap/cable/ice100.c +++ b/urjtag/src/tap/cable/ice100.c @@ -786,9 +786,6 @@ static void adi_flush (urj_cable_t *cable, urj_cable_flush_amount_t how_much) int32_t tdo_idx = -1; int32_t i, j, k, n; uint8_t *tdo_ptr = NULL; - num_tap_pairs debug1, debug2; - - debug1 = *tap_info; if (how_much == URJ_TAP_CABLE_OPTIONALLY) { @@ -950,7 +947,6 @@ static void adi_flush (urj_cable_t *cable, urj_cable_flush_amount_t how_much) else DEBUG ("Skipping sending out scan, Idx = %d\n", tap_info->cur_idx); #endif - debug2 = *tap_info; /* Here we send out the scan/cmd * need to look at how_much */ while (j != i) @@ -1613,7 +1609,6 @@ static int perform_scan (urj_cable_t *cable, uint8_t **rdata) int32_t idx, collect_data = 0; int32_t cur_len = cable_params->tap_info.cur_idx; int32_t rem_len; - int32_t rd_scan_len; /* Data is scan as 32 bit words, so boundaries are adjusted here */ if (tap_info->bit_pos != 0x80) /* meaning no dangling bits? */ @@ -1661,7 +1656,6 @@ static int perform_scan (urj_cable_t *cable, uint8_t **rdata) len); return URJ_STATUS_FAIL; } - rd_scan_len = cur_len; *rdata = out; collect_data = 1; } @@ -1674,7 +1668,6 @@ static int perform_scan (urj_cable_t *cable, uint8_t **rdata) cable_params->tap_pair_start_idx + 16); return URJ_STATUS_FAIL; } - rd_scan_len = 0; collect_data = 0; }