This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 7b5e54cd7bb53b101f15206963a6a5acaee27018
Author: guoshichao <[email protected]>
AuthorDate: Fri Jun 28 14:36:35 2024 +0800

    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 <[email protected]>
---
 testing/ostest/fpu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testing/ostest/fpu.c b/testing/ostest/fpu.c
index 6d84cd58e..65545b00b 100644
--- a/testing/ostest/fpu.c
+++ b/testing/ostest/fpu.c
@@ -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

Reply via email to