npdm: Resolve -Wdiscarded-qualifiers warnings

Like with 52486c12e3, these functions'
return types was char*, which casts away the constness of the string
literals.
This commit is contained in:
Lioncash 2018-09-02 09:58:59 -04:00
parent 52486c12e3
commit 83077e3991
2 changed files with 3 additions and 3 deletions

4
npdm.c
View file

@ -213,7 +213,7 @@ static const fs_perm_t fs_permissions_bool[MAX_FS_PERM_BOOL] = {
{"Unknown (0x1A)", 0x8000000000004020}
};
char *npdm_get_proc_category(int process_category) {
const char *npdm_get_proc_category(int process_category) {
switch (process_category) {
case 0:
return "Regular Title";
@ -224,7 +224,7 @@ char *npdm_get_proc_category(int process_category) {
}
}
static char *kac_get_app_type(uint32_t app_type) {
static const char *kac_get_app_type(uint32_t app_type) {
switch (app_type) {
case 0:
return "System Module";

2
npdm.h
View file

@ -137,7 +137,7 @@ void npdm_process(npdm_t *npdm, hactool_ctx_t *tool_ctx);
void npdm_print(npdm_t *npdm, hactool_ctx_t *tool_ctx);
void npdm_save(npdm_t *npdm, hactool_ctx_t *tool_ctx);
char *npdm_get_proc_category(int process_category);
const char *npdm_get_proc_category(int process_category);
void kac_print(const uint32_t *descriptors, uint32_t num_descriptors);
char *npdm_get_json(npdm_t *npdm);