workaround new gcc-4.6 set-but-unused build warnings

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1926 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent e7bb12754a
commit 5d6c06ab80

@ -1,3 +1,8 @@
2011-06-29 Mike Frysinger <vapier@gentoo.org>
* src/tap/cable.c (urj_tap_cable_wait): Tweak code style to silence warnings
thrown up by gcc-4.6 and cause build failures with -Werror.
2011-06-27 Jie Zhang <jie.zhang@analog.com>
* include/urjtag/Makefile.am (nodist_pkginclude_HEADERS): New and

@ -522,15 +522,13 @@ urj_tap_cable_wait (urj_cable_t *cable)
{
int i;
volatile int j;
uint32_t delay = cable->delay;
if (delay == 0)
return;
for (i = 0; i < delay; ++i)
{
j = 0;
for (i = 0; i < cable->delay; ++i)
j = i;
}
/* Avoid gcc set-but-unused warnings */
cable->delay = j;
}
static urj_cable_t *

Loading…
Cancel
Save