ostest/fpu.c: fix the greenhills compile warning

CC:  binfmt_unregister.c "fpu.c", line 98: warning #1160-D: a reduction in alignment without the
          "packed" attribute is ignored
    uintptr_t save1[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
              ^

"fpu.c", line 99: warning #1160-D: a reduction in alignment without the
          "packed" attribute is ignored
    uintptr_t save2[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
              ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao 2024-06-28 14:36:35 +08:00 committed by Xiang Xiao
parent 7abd0a7303
commit 7b5e54cd7b

View File

@ -102,8 +102,13 @@ typedef uintptr_t uintreg_t;
struct fpu_threaddata_s
{
#if XCPTCONTEXT_ALIGN > 1
uintreg_t save1[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
uintreg_t save2[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
#else
uintreg_t save1[XCPTCONTEXT_REGS];
uintreg_t save2[XCPTCONTEXT_REGS];
#endif
/* These are just dummy values to force the compiler to do the
* requested floating point computations without the nonsense