debug: symtab: fix ignored type qualifiers on func return type

const is ignored on the function return type. A warning is reported with
-Wignored-qualifers. Remove the ignored const.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
This commit is contained in:
Ryan McClelland 2024-11-01 15:52:39 -07:00 committed by Dan Kalowsky
parent 7e1cd18be4
commit 952daca695
2 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ struct symtab_info {
*
* @return Pointer to the symbol table.
*/
const struct symtab_info *const symtab_get(void);
const struct symtab_info *symtab_get(void);
/**
* @brief Find the symbol name with a binary search
@ -57,7 +57,7 @@ const struct symtab_info *const symtab_get(void);
*
* @return Name of the nearest symbol if found, otherwise "?" is returned.
*/
const char *const symtab_find_symbol_name(uintptr_t addr, uint32_t *offset);
const char *symtab_find_symbol_name(uintptr_t addr, uint32_t *offset);
/**
* @}

View File

@ -10,14 +10,14 @@
#include <zephyr/debug/symtab.h>
#include <zephyr/shell/shell.h>
const struct symtab_info *const symtab_get(void)
const struct symtab_info *symtab_get(void)
{
extern const struct symtab_info z_symtab;
return &z_symtab;
}
const char *const symtab_find_symbol_name(uintptr_t addr, uint32_t *offset)
const char *symtab_find_symbol_name(uintptr_t addr, uint32_t *offset)
{
const struct symtab_info *const symtab = symtab_get();
const uint32_t symbol_offset = addr - symtab->first_addr;