From 57cb28b484b664c83046e064ac18f4ace4cb9181 Mon Sep 17 00:00:00 2001 From: Evan Hunter Date: Tue, 22 Nov 2011 16:05:39 +1100 Subject: [PATCH] Fix unused variables error in amt_jtagaccel MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: Ic64cf4e3b5cf8c1ea75a13577728b0cb0d70068e Signed-off-by: Evan Hunter Reviewed-on: http://openocd.zylin.com/237 Tested-by: jenkins Reviewed-by: Øyvind Harboe --- src/jtag/drivers/amt_jtagaccel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/jtag/drivers/amt_jtagaccel.c b/src/jtag/drivers/amt_jtagaccel.c index a433e81e..34a4ae78 100644 --- a/src/jtag/drivers/amt_jtagaccel.c +++ b/src/jtag/drivers/amt_jtagaccel.c @@ -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 -- 2.39.5