xtensa: gdbstub: fix compiler warning about discarding const
Inside copy_to_ctx(), we are typecasting the stack pointer into a 32-bit array pointer, and there was unbalanced const between two sides. Since we should not be modifying anything inside that array, add const to the 32-bit array pointer too. So now the compiler will not complain about discarding the const qualifier. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
d00095c4a6
commit
c7841ce472
1 changed files with 1 additions and 1 deletions
|
@ -427,7 +427,7 @@ static void copy_to_ctx(struct gdb_ctx *ctx, const struct arch_esf *stack)
|
|||
struct xtensa_register *reg;
|
||||
int idx, num_laddr_regs;
|
||||
|
||||
uint32_t *bsa = *(const int **)stack;
|
||||
const uint32_t *bsa = *(const int **)stack;
|
||||
|
||||
if (bsa - (const uint32_t *)stack > 12) {
|
||||
num_laddr_regs = 16;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue