anchao opened a new pull request, #7813:
URL: https://github.com/apache/nuttx/pull/7813

   
   ## Summary
   
   risc-v/backtrace: fix compile warning
   
   
   ```
   common/riscv_backtrace.c: In function 'up_backtrace': 
common/riscv_backtrace.c:145:27: error: passing argument 1 of 'backtrace' from 
incompatible pointer type [-Werror=incompatible-pointer-types]
     145 |           ret = backtrace(g_intstackalloc,
         |                           ^~~~~~~~~~~~~~~
         |                           |
         |                           uint8_t * {aka unsigned char *}
   common/riscv_backtrace.c:64:33: note: expected 'uintptr_t *' {aka 'unsigned 
int *'} but argument is of type 'uint8_t *' {aka 'unsigned char *'}
      64 | static int backtrace(uintptr_t *base, uintptr_t *limit,
         |                      ~~~~~~~~~~~^~~~
   common/riscv_backtrace.c:146:43: error: passing argument 2 of 'backtrace' 
from incompatible pointer type [-Werror=incompatible-pointer-types]
     146 |                           g_intstackalloc + 
CONFIG_ARCH_INTERRUPTSTACK,
         |                                           ^
         |                                           |
         |                                           uint8_t * {aka unsigned 
char *}
   common/riscv_backtrace.c:64:50: note: expected 'uintptr_t *' {aka 'unsigned 
int *'} but argument is of type 'uint8_t *' {aka 'unsigned char *'}
      64 | static int backtrace(uintptr_t *base, uintptr_t *limit,
         |                                       ~~~~~~~~~~~^~~~~
   ```
   
   Regression by:
   ```
   | commit 70290b6e384e979e44fe3f9777b62e6c1aad787a
   | Author: Xiang Xiao <[email protected]>
   | Date:   Tue Sep 20 02:38:54 2022 +0800
   |
   |     arch: Change the linker generated symbols from uint32_t to uint8_t *
   |
   |     and remove the duplicated declaration
   |
   |     Signed-off-by: Xiang Xiao <[email protected]>
   ```
   
   Signed-off-by: chao an <[email protected]>
   
   
   ## Impact
   
   N/A
   
   ## Testing
   
   enable CONFIG_SCHED_BACKTRACE/CONFIG_FRAME_POINTER


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to