You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/21 12:09:07 UTC

[GitHub] [incubator-nuttx] eenurkka opened a new pull request, #7638: risc-v/mpfs: fix compile warning

eenurkka opened a new pull request, #7638:
URL: https://github.com/apache/incubator-nuttx/pull/7638

   After commit b7d2b38, the system suffers from -Warray-bounds warning with -Wall:
   
   chip/mpfs_opensbi.c: In function 'mpfs_hart_to_scratch': chip/mpfs_opensbi.c:251:26: warning: array subscript hartid is outside array bounds of 'sbi_scratch_holder_t[0]' {aka 'struct sbi_scratch_holder_s[]'} [-Warray-bounds]
     251 |   return (unsigned long)(&g_scratches[hartid].scratch);
   
   Fix it by reverting back to what is was earlier. g_scratches shouldn't be in the bss region that would be zeroed out.
   
   Signed-off-by: Eero Nurkkala <ee...@offcode.fi>
   
   ## Summary
   
   Earlier commit introduced a warning with -Wall, fix it
   
   ## Impact
   
   MPFS / OpenSBI
   
   ## Testing
   
   MPFS Icicle board with coldboot hart  = 3 or 4
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #7638: risc-v/mpfs: fix compile warning

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #7638:
URL: https://github.com/apache/incubator-nuttx/pull/7638


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org