]> git.sur5r.net Git - openocd/commitdiff
build: fix gcc 4.6.2 warnings
authorSpencer Oliver <spen@spen-soft.co.uk>
Mon, 14 Nov 2011 15:43:35 +0000 (15:43 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Fri, 18 Nov 2011 13:29:22 +0000 (13:29 +0000)
see trac #47

Change-Id: I48a3e963354dfc82209477672c2508c96fb737d6
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/198
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/jtag/drivers/amt_jtagaccel.c

index a433e81eb6661c30a97888d11d9d325cf53e2a22..424019e19dcbbd7f78c5c8873f95ed20d7423670 100644 (file)
@@ -68,34 +68,26 @@ static const int addr_mode = IEEE1284_MODE_EPP | IEEE1284_ADDR;
 
 #define AMT_AW(val) \
        do { \
-               int __retval; \
-               \
-               __retval = ioctl(device_handle, PPSETMODE, &addr_mode); \
-               __retval = write(device_handle, &val, 1); \
+               ioctl(device_handle, PPSETMODE, &addr_mode); \
+               write(device_handle, &val, 1); \
        } while (0)
 #define AMT_AR(val) \
        do { \
-               int __retval; \
-               \
-               __retval = ioctl(device_handle, PPSETMODE, &addr_mode); \
-               __retval = read(device_handle, &val, 1); \
+               ioctl(device_handle, PPSETMODE, &addr_mode); \
+               read(device_handle, &val, 1); \
        } while (0)
 
 static const int data_mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
 
 #define AMT_DW(val) \
        do { \
-               int __retval; \
-               \
-               __retval = ioctl(device_handle, PPSETMODE, &data_mode); \
-               __retval = write(device_handle, &val, 1); \
+               ioctl(device_handle, PPSETMODE, &data_mode); \
+               write(device_handle, &val, 1); \
        } while (0)
 #define AMT_DR(val) \
        do { \
-               int __retval; \
-               \
-               __retval = ioctl(device_handle, PPSETMODE, &data_mode); \
-               __retval = read(device_handle, &val, 1); \
+               ioctl(device_handle, PPSETMODE, &data_mode); \
+               read(device_handle, &val, 1); \
        } while (0)
 
 #else