mirror of
https://github.com/SciresM/hactool
synced 2024-11-10 06:34:14 +00:00
npdm: Silence -Wformat warnings
One case was specifying a size smaller than the actual type being printed, while the other was caused due to C's integral promotion rules. Operation on types smaller than int, will be promoted to an int. In this case, the mask was unnecessary anyways, so it can just be removed.
This commit is contained in:
parent
0318763fe8
commit
653ed85536
1 changed files with 2 additions and 2 deletions
4
npdm.c
4
npdm.c
|
@ -440,7 +440,7 @@ void kac_print(const uint32_t *descriptors, uint32_t num_descriptors) {
|
|||
}
|
||||
|
||||
if (kac.has_kern_ver) {
|
||||
printf(" Minimum Kernel Version: %"PRIx8"\n", kac.kernel_release_version);
|
||||
printf(" Minimum Kernel Version: %"PRIu32"\n", kac.kernel_release_version);
|
||||
}
|
||||
|
||||
if (kac.has_debug_flags) {
|
||||
|
@ -710,7 +710,7 @@ void cJSON_AddU8ToObject(cJSON *obj, const char *name, uint8_t val) {
|
|||
|
||||
void cJSON_AddU16ToObject(cJSON *obj, const char *name, uint16_t val) {
|
||||
char buf[0x20] = {0};
|
||||
snprintf(buf, sizeof(buf), "0x%04"PRIx16, val & 0xFFFF);
|
||||
snprintf(buf, sizeof(buf), "0x%04"PRIx16, val);
|
||||
cJSON_AddStringToObject(obj, name, buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue