summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2014-10-07 11:38:10 -0700
committerMike Christie <michaelc@cs.wisc.edu>2014-11-11 19:59:01 -0600
commit06309ad1509854e9147f14d13a9a7278050da7db (patch)
tree2f10d169e5adcbeb9490a5df1b44baa3c90416ec /utils
parentf6d7d30caef39b38bde786fec41fb83d360bb196 (diff)
downloadopen-iscsi-06309ad1509854e9147f14d13a9a7278050da7db.tar.gz
Fix build warnings for unused variables
Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/open-isns/bitvector.c15
-rw-r--r--utils/open-isns/dd.c3
2 files changed, 7 insertions, 11 deletions
diff --git a/utils/open-isns/bitvector.c b/utils/open-isns/bitvector.c
index 3e23f26..9d66276 100644
--- a/utils/open-isns/bitvector.c
+++ b/utils/open-isns/bitvector.c
@@ -327,10 +327,10 @@ isns_bitvector_is_empty(const isns_bitvector_t *bv)
wp = bv->ib_words;
end = wp + bv->ib_count;
while (wp < end) {
- unsigned int base, rlen;
+ unsigned int rlen;
- base = *wp++;
- rlen = *wp++;
+ rlen = wp[1];
+ wp += 2;
while (rlen--) {
if (*wp++)
@@ -462,11 +462,10 @@ isns_bitvector_foreach(const isns_bitvector_t *bv,
wp = bv->ib_words;
end = wp + bv->ib_count;
while (wp < end) {
- unsigned int base, rlen, bits;
+ unsigned int base, rlen;
base = wp[0];
rlen = wp[1];
- bits = rlen * 32;
wp += 2;
while (rlen--) {
@@ -492,11 +491,10 @@ isns_bitvector_dump(const isns_bitvector_t *bv, isns_print_fn_t *fn)
wp = bv->ib_words;
end = wp + bv->ib_count;
while (wp < end) {
- unsigned int base, rlen, bits;
+ unsigned int base, rlen;
base = wp[0];
rlen = wp[1];
- bits = rlen * 32;
wp += 2;
fn(" <%u:", base);
@@ -538,11 +536,10 @@ isns_bitvector_print(const isns_bitvector_t *bv,
wp = bv->ib_words;
end = wp + bv->ib_count;
while (wp < end) {
- unsigned int base, rlen, bits;
+ unsigned int base, rlen;
base = wp[0];
rlen = wp[1];
- bits = rlen * 32;
wp += 2;
while (rlen--) {
diff --git a/utils/open-isns/dd.c b/utils/open-isns/dd.c
index b392036..c2dcd10 100644
--- a/utils/open-isns/dd.c
+++ b/utils/open-isns/dd.c
@@ -599,10 +599,9 @@ isns_dd_insert(isns_dd_t *dd)
void
isns_dd_list_resize(isns_dd_list_t *list, unsigned int last_index)
{
- unsigned int new_size, cur_size;
+ unsigned int new_size;
isns_dd_t **new_data;
- cur_size = LIST_SIZE(list->ddl_count);
new_size = LIST_SIZE(last_index + 1);
if (new_size < list->ddl_count)
return;