mirror of
https://github.com/apache/nuttx.git
synced 2025-12-07 01:44:23 +08:00
sched/tcbinfo: Fix the compile warning
Update tcbinfo struct
armv8-m/arm_tcbinfo.c:109:3: warning: excess elements in struct initializer
109 | TCB_REG_OFF(REG_S31),
| ^~~~~~~~~~~
armv8-m/arm_tcbinfo.c:109:3: note: (near initialization for 'g_tcbinfo')
armv8-m/arm_tcbinfo.c:110:3: warning: excess elements in struct initializer
110 | 0,
| ^
armv8-m/arm_tcbinfo.c:110:3: note: (near initialization for 'g_tcbinfo')
armv8-m/arm_tcbinfo.c:111:3: warning: excess elements in struct initializer
111 | TCB_REG_OFF(REG_FPSCR),
| ^~~~~~~~~~~
armv8-m/arm_tcbinfo.c:111:3: note: (near initialization for 'g_tcbinfo')
armv8-m/arm_tcbinfo.c:112:3: warning: excess elements in struct initializer
112 | 0,
| ^
armv8-m/arm_tcbinfo.c:112:3: note: (near initialization for 'g_tcbinfo')
armv8-m/arm_tcbinfo.c:37:1: warning: missing braces around initializer [-Wmissing-braces]
37 | {
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
@@ -247,7 +247,7 @@ static void elf_emit_note_info(FAR struct elf_dumpinfo_s *cinfo)
|
||||
for (j = 0; j < ARRAY_SIZE(status.pr_regs); j++)
|
||||
{
|
||||
status.pr_regs[j] = *(uintptr_t *)((uint8_t *)tcb +
|
||||
g_tcbinfo.reg_offs[j]);
|
||||
g_tcbinfo.reg_off.p[j]);
|
||||
}
|
||||
|
||||
elf_emit(cinfo, &status, sizeof(status));
|
||||
|
||||
Reference in New Issue
Block a user