]> git.sur5r.net Git - openocd/commitdiff
Fix unused variables error in amt_jtagaccel
authorEvan Hunter <ehunter@broadcom.com>
Tue, 22 Nov 2011 05:05:39 +0000 (16:05 +1100)
committerØyvind Harboe <oyvindharboe@gmail.com>
Fri, 25 Nov 2011 06:22:02 +0000 (06:22 +0000)
Change-Id: Ic64cf4e3b5cf8c1ea75a13577728b0cb0d70068e
Signed-off-by: Evan Hunter <ehunter@broadcom.com>
Reviewed-on: http://openocd.zylin.com/237
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
src/jtag/drivers/amt_jtagaccel.c

index a433e81eb6661c30a97888d11d9d325cf53e2a22..34a4ae784d3a34d0aca47956eede1328d9db71f0 100644 (file)
@@ -71,14 +71,18 @@ static const int addr_mode = IEEE1284_MODE_EPP | IEEE1284_ADDR;
                int __retval; \
                \
                __retval = ioctl(device_handle, PPSETMODE, &addr_mode); \
+               assert(__retval >= 0); \
                __retval = write(device_handle, &val, 1); \
+               assert(__retval >= 0); \
        } while (0)
 #define AMT_AR(val) \
        do { \
                int __retval; \
                \
                __retval = ioctl(device_handle, PPSETMODE, &addr_mode); \
+               assert(__retval >= 0); \
                __retval = read(device_handle, &val, 1); \
+               assert(__retval >= 0); \
        } while (0)
 
 static const int data_mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
@@ -88,14 +92,18 @@ static const int data_mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
                int __retval; \
                \
                __retval = ioctl(device_handle, PPSETMODE, &data_mode); \
+               assert(__retval >= 0); \
                __retval = write(device_handle, &val, 1); \
+               assert(__retval >= 0); \
        } while (0)
 #define AMT_DR(val) \
        do { \
                int __retval; \
                \
                __retval = ioctl(device_handle, PPSETMODE, &data_mode); \
+               assert(__retval >= 0); \
                __retval = read(device_handle, &val, 1); \
+               assert(__retval >= 0); \
        } while (0)
 
 #else