fix PrintAndLogEx format string mismatches

Found by building with a printf format attribute on PrintAndLogEx.

User visible:
- hw version: GENERIC device/firmware name was passed as an unused arg
  and never printed
- hf saflok selftest: PRIx32 lacked '%', printed a literal 'x'
- hf mfp: key index value was never printed
- hf waveshare: output filename was never printed

Also: size_t/int64_t/uint64_t specifiers (%zu, PRId64, PRIX64), int
macros printed with %zu, ' ' flag on %u, unused arg in flash_prepare,
and non-literal strings passed as the format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
iceman1001andClaude Opus 5.5 committed 2026-11-09 18:20:15 +07:00
1 parent fb8a354249
commit 3deae3d904
15 files changed
+29 -29

No files matched your search

+1 -1
View File
@@ -440,7 +440,7 @@ int flash_prepare(flash_file_t *ctx, int can_write_bl, flash_dev_t *flash_dev) {
// Check elf file is build for currently connected device?
if (!CheckInformationMagicAndChipType(ctx->ver_info, flash_dev->chiptype)) {
PrintAndLogEx(ERR, "The elf file is not applicable to the currently connected device.", flash_dev->chiptype);
PrintAndLogEx(ERR, "The elf file is not applicable to the currently connected device.");
res = PM3_EFILE;
goto fail;
}