From 5f00c007cb93b2d99a54b60406a659f671b69b81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Tue, 1 Nov 2011 22:59:17 +0100 Subject: [PATCH] usbtoxxx: remove warning by reducing scope of variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Icc3cfe601082cd83ad1c8818c1e21e7ada014150 Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/154 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c index 64e31a65..f92f38c9 100644 --- a/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c +++ b/src/jtag/drivers/versaloon/usbtoxxx/usbtoxxx.c @@ -199,9 +199,9 @@ RESULT usbtoxxx_execute_command(void) } if (!processed) { - struct versaloon_want_pos_t *tmp, *free_tmp; + struct versaloon_want_pos_t *tmp; - free_tmp = tmp = versaloon_pending[i].pos; + tmp = versaloon_pending[i].pos; while (tmp != NULL) { if ((tmp->buff != NULL) && (tmp->size > 0)) @@ -209,6 +209,7 @@ RESULT usbtoxxx_execute_command(void) memcpy(tmp->buff, versaloon_buf + usbtoxxx_buffer_index + tmp->offset, tmp->size); } + struct versaloon_want_pos_t *free_tmp; free_tmp = tmp; tmp = tmp->next; free(free_tmp); -- 2.39.5