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

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

commit b2a739a67a278a0c6b0656546835012110184428
Author: guoshichao <[email protected]>
AuthorDate: Mon Jul 22 15:59:46 2024 +0800

    greenhills: fix the can.h build error
    
    CC:  src/algslib_sha256.c "comlin.c", line 189: error #1982-D: target stack 
alignment is insufficient to
              guarantee alignment of this variable
          struct can_frame lin_err_frame = comlin_rx_frame[chlId];
                           ^
    
    "comlin.c", line 282: error #1982-D: target stack alignment is insufficient 
to
              guarantee alignment of this variable
          struct can_frame frame;
                           ^
    
    "comlin.c", line 321: error #1982-D: target stack alignment is insufficient 
to
              guarantee alignment of this variable
          struct can_frame frame;
    
    "DiagServer_IsoTp.c", line 220: error #1982-D: target stack alignment is
              insufficient to guarantee alignment of this variable
          struct canfd_frame frame = {0};
                             ^
    
    Signed-off-by: guoshichao <[email protected]>
---
 include/nuttx/can.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/nuttx/can.h b/include/nuttx/can.h
index 1616681598..982a193106 100644
--- a/include/nuttx/can.h
+++ b/include/nuttx/can.h
@@ -326,7 +326,7 @@ struct can_frame
   uint8_t  __pad;   /* padding */
   uint8_t  __res0;  /* reserved / padding */
   uint8_t  __res1;  /* reserved / padding */
-  uint8_t  data[CAN_MAX_DLEN] aligned_data(8);
+  uint8_t  data[CAN_MAX_DLEN];
 };
 
 /* struct canfd_frame - CAN flexible data rate frame structure
@@ -345,7 +345,7 @@ struct canfd_frame
   uint8_t flags;   /* additional flags for CAN FD */
   uint8_t __res0;  /* reserved / padding */
   uint8_t __res1;  /* reserved / padding */
-  uint8_t data[CANFD_MAX_DLEN] aligned_data(8);
+  uint8_t data[CANFD_MAX_DLEN];
 };
 
 /* struct can_filter - CAN ID based filter in can_register().

Reply via email to