mirror of
https://github.com/SciresM/hactool.git
synced 2024-11-26 22:10:24 +00:00
nca: Resolve -Wdiscarded-qualifiers warnings
String literals are always const char arrays of N length (where N is the number of characters plus the null terminator), given a few functions were returning by char*, they were casting the const qualifier away, causing warnings. This is a safe change, as these are only used with logging functions.
This commit is contained in:
parent
a4e8ab6322
commit
52486c12e3
8
nca.c
8
nca.c
@ -657,7 +657,7 @@ void nca_decrypt_key_area(nca_ctx_t *ctx) {
|
||||
}
|
||||
|
||||
|
||||
static char *nca_get_distribution_type(nca_ctx_t *ctx) {
|
||||
static const char *nca_get_distribution_type(nca_ctx_t *ctx) {
|
||||
switch (ctx->header.distribution) {
|
||||
case 0:
|
||||
return "Download";
|
||||
@ -668,7 +668,7 @@ static char *nca_get_distribution_type(nca_ctx_t *ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
static char *nca_get_content_type(nca_ctx_t *ctx) {
|
||||
static const char *nca_get_content_type(nca_ctx_t *ctx) {
|
||||
switch (ctx->header.content_type) {
|
||||
case 0:
|
||||
return "Program";
|
||||
@ -685,7 +685,7 @@ static char *nca_get_content_type(nca_ctx_t *ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
static char *nca_get_encryption_type(nca_ctx_t *ctx) {
|
||||
static const char *nca_get_encryption_type(nca_ctx_t *ctx) {
|
||||
if (ctx->has_rights_id) {
|
||||
return "Titlekey crypto";
|
||||
} else {
|
||||
@ -727,7 +727,7 @@ static void nca_print_key_area(nca_ctx_t *ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
static char *nca_get_section_type(nca_section_ctx_t *meta) {
|
||||
static const char *nca_get_section_type(nca_section_ctx_t *meta) {
|
||||
switch (meta->type) {
|
||||
case PFS0: {
|
||||
if (meta->pfs0_ctx.is_exefs) return "ExeFS";
|
||||
|
Loading…
Reference in New Issue
Block a user