]> git.sur5r.net Git - openocd/commitdiff
Revert "build: fix gcc 4.6.2 warnings"
authorSpencer Oliver <spen@spen-soft.co.uk>
Fri, 18 Nov 2011 15:09:34 +0000 (15:09 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Fri, 18 Nov 2011 15:16:35 +0000 (15:16 +0000)
This reverts commit 0ef5a90d93c5a026bcf70132e60e957ae339d1e1

Causes older versions of gcc to break - need to look into a better fix.

This passed through the jenkins build as we originally did not build this module - we do now.

Change-Id: Iafeac8442b2249269ff45a52ccd3e2870920f635
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/214
Tested-by: jenkins
src/jtag/drivers/amt_jtagaccel.c

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