aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2010-02-20 11:11:43 -0800
committerDavid Brownell <dbrownell@users.sourceforge.net>2010-02-20 11:11:43 -0800
commitd2a2c14d202da736e2c820c26d6deceee4e1e530 (patch)
treede3135cc16a72637f454a65a077e3f7e2c67199d /src
parent3f30563c88fcf02a8a8e671d817299adfda628ec (diff)
downloadriscv-openocd-d2a2c14d202da736e2c820c26d6deceee4e1e530.zip
riscv-openocd-d2a2c14d202da736e2c820c26d6deceee4e1e530.tar.gz
riscv-openocd-d2a2c14d202da736e2c820c26d6deceee4e1e530.tar.bz2
FreeBSD buildfix
Fix an unused variable warning seen when building the parport driver under FreeBSD. Using information from Xiaofan Chen <xiaofanc@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Diffstat (limited to 'src')
-rw-r--r--src/jtag/drivers/parport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c
index a38ccfd..fa3373b 100644
--- a/src/jtag/drivers/parport.c
+++ b/src/jtag/drivers/parport.c
@@ -265,7 +265,6 @@ static int parport_init(void)
struct cable *cur_cable;
#if PARPORT_USE_PPDEV == 1
char buffer[256];
- int i = 0;
#endif
cur_cable = cables;
@@ -323,7 +322,8 @@ static int parport_init(void)
LOG_DEBUG("...open");
#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
- i = ioctl(device_handle, PPCLAIM);
+ int i = ioctl(device_handle, PPCLAIM);
+
if (i < 0)
{
LOG_ERROR("cannot claim device");