]> git.sur5r.net Git - openocd/commitdiff
FreeBSD buildfix
authorDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 20 Feb 2010 19:11:43 +0000 (11:11 -0800)
committerDavid Brownell <dbrownell@users.sourceforge.net>
Sat, 20 Feb 2010 19:11:43 +0000 (11:11 -0800)
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>
src/jtag/drivers/parport.c

index a38ccfd8824ef4532343422f17679bcecb18476f..fa3373b0cd32e4b7802154d0cfdeefda007a4773 100644 (file)
@@ -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");