From d2a2c14d202da736e2c820c26d6deceee4e1e530 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sat, 20 Feb 2010 11:11:43 -0800 Subject: FreeBSD buildfix Fix an unused variable warning seen when building the parport driver under FreeBSD. Using information from Xiaofan Chen Signed-off-by: David Brownell --- src/jtag/drivers/parport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/jtag/drivers/parport.c b/src/jtag/drivers/parport.c index a38ccfd8..fa3373b0 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"); -- cgit v1.2.3