2
0
mirror of git://git.code.sf.net/p/openocd/code synced 2025-07-19 04:48:44 +10:00
openocd/src
Antonio Borneo 17f86fdedf rtos: uCOS-III: split struct ucos_iii_params
The static analyser 'sparse' complains about using sizeof() on a
struct that has variable size:
	src/rtos/uCOS-III.c:267:32: warning: using sizeof on a flexible structure
	src/rtos/uCOS-III.c:269:41: warning: using sizeof on a flexible structure
	src/rtos/uCOS-III.c:275:66: warning: using sizeof on a flexible structure
The struct ucos_iii_params contains either constants values for
different target type and variable fields. The last field is an
variable size array, always allocated to UCOS_III_MAX_THREADS
items. It's not practical to fix this size because we would get
too huge initialization in data segment.

Split away from struct ucos_iii_params all the variable fields and
put them in struct ucos_iii_private. Add in the new struct a
pointer to the selected element of ucos_iii_params_list[] and fix
the size of array threads[] to its maximum value; this would be
allocated at run-time, avoiding impacts to data segment.

Change-Id: I569011a257783d35a8795adbda06e942b4157f2a
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7678
Tested-by: jenkins
2023-05-18 10:17:18 +00:00
..
flash flash: nand: move in include file the declaration of 'nand_devices' 2023-05-18 10:15:41 +00:00
helper server: gdb: export gdb_actual_connections through a function 2023-05-18 10:14:56 +00:00
jtag jtag: move declaration outside function 2023-05-18 10:14:21 +00:00
pld pld: fix new warnings from sparse 2023-05-18 10:11:29 +00:00
rtos rtos: uCOS-III: split struct ucos_iii_params 2023-05-18 10:17:18 +00:00
rtt rtt: rewrite command 'rtt channellist' as COMMAND_HANDLER 2023-03-25 18:11:14 +00:00
server server: gdb: export gdb_actual_connections through a function 2023-05-18 10:14:56 +00:00
svf svf: make command 'svf' syntax consistent 2023-03-25 18:09:06 +00:00
target target: arm_adi_v5: move in include file the declaration of dap_ops 2023-05-18 10:16:12 +00:00
transport transport: rewrite command 'transport select' as COMMAND_HANDLER 2023-03-25 18:09:47 +00:00
xsvf openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
hello.c hello: include hello.h 2023-05-18 10:13:41 +00:00
hello.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00
main.c openocd: fix SPDX tag format for files .c 2022-09-18 08:22:01 +00:00
Makefile.am
openocd.c openocd: rewrite command 'version' as COMMAND_HANDLER 2023-03-25 18:10:54 +00:00
openocd.h openocd: src: replace the GPL-2.0-or-later license tag 2022-07-23 13:59:13 +00:00