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.git
The following commit(s) were added to refs/heads/master by this push:
new af149b44cd risc-v/backtrace: fix compile warning
af149b44cd is described below
commit af149b44cdac6075875745e51c53c9db20f0f8f3
Author: chao an <[email protected]>
AuthorDate: Wed Dec 7 17:27:41 2022 +0800
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]>
---
arch/risc-v/src/common/riscv_backtrace.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/risc-v/src/common/riscv_backtrace.c
b/arch/risc-v/src/common/riscv_backtrace.c
index b7be33d744..c59c10d9bc 100644
--- a/arch/risc-v/src/common/riscv_backtrace.c
+++ b/arch/risc-v/src/common/riscv_backtrace.c
@@ -142,8 +142,9 @@ int up_backtrace(struct tcb_s *tcb, void **buffer, int
size, int skip)
if (up_interrupt_context())
{
#if CONFIG_ARCH_INTERRUPTSTACK > 15
- ret = backtrace(g_intstackalloc,
- g_intstackalloc + CONFIG_ARCH_INTERRUPTSTACK,
+ ret = backtrace((uintptr_t *)g_intstackalloc,
+ (uintptr_t *)(g_intstackalloc +
+ CONFIG_ARCH_INTERRUPTSTACK),
(void *)getfp(), NULL, buffer, size, &skip);
#else
ret = backtrace(rtcb->stack_base_ptr,