openocd/src
Antonio Borneo d493b53e8c jtag/aice: avoid abusing of int32_t type
In several cases the 'int' status value returned by libusb and by
aice internal functions is taken in a variable of type 'int32_t',
requiring an implicit (but trivial) cast.
This makes compulsory using 'PRId32' in the format strings that
print such 'int32_t' result and requires an additional implicit
conversion to return the 'int32_t' as 'int'.

Replace to type 'int' all the occurrences of 'int32_t result' and
fix accordingly the format strings.

Plus, all the size of aice commands are stored as int32_t const
variables with uppercase name, violating the coding style, and are
then passed as 'int' parameter to the read/write functions.

Replace the variables with C macros carrying an 'int' value.

While there, replace also a 'uint32_t' loop index with 'unsigned'
and fix the format string in the loop.

Change-Id: Ic57d58770f1af95f003b5a02fbcb7c926ec06fd1
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5814
Tested-by: jenkins
2020-09-05 17:12:19 +01:00
..
flash flash: avoid checking for non NULL pointer to free it 2020-09-05 17:11:34 +01:00
helper openocd: avoid checking for non NULL pointer to free it 2020-09-05 17:11:50 +01:00
jtag jtag/aice: avoid abusing of int32_t type 2020-09-05 17:12:19 +01:00
pld helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
rtos openocd: avoid checking for non NULL pointer to free it 2020-09-05 17:11:50 +01:00
server openocd: avoid checking for non NULL pointer to free it 2020-09-05 17:11:50 +01:00
svf openocd: avoid checking for non NULL pointer to free it 2020-09-05 17:11:50 +01:00
target adi_v5: use macro DP_APSEL_MAX to allocate struct adiv5_ap 2020-09-05 17:11:11 +01:00
transport transport: fix minor typos 2020-07-26 20:14:14 +01:00
xsvf openocd: avoid checking for non NULL pointer to free it 2020-09-05 17:11:50 +01:00
hello.c helper/command: change prototype of command_print/command_print_sameline 2019-05-14 19:37:11 +01:00
hello.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00
main.c Remove FSF address from GPL notices 2016-05-24 22:30:01 +01:00
Makefile.am Convert to non-recursive make 2016-12-08 16:23:10 +00:00
openocd.c openocd: fix issue in WIN32 with TCP adapters 2020-06-14 14:23:48 +01:00
openocd.h Make #include guard naming consistent 2016-05-24 22:30:55 +01:00