From 7822cbd8b1a190775bd5a4fc1e2ba599382c0e76 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 17 Sep 2026 22:53:58 +0200 Subject: [PATCH] silent gcc warnings on ARMHF architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warnings are false-positive: resp.data is a union of uint8_t asBytes[] and uint32_t asDwords[], so the buffer is actually 4-byte aligned — but casting uint8_t* directly to a stricter-aligned struct pointer trips -Wcast-align. Fix by routing through (const void *) --- client/src/cmdhfepa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/cmdhfepa.c b/client/src/cmdhfepa.c index 2cd8092c2..7c0106c39 100644 --- a/client/src/cmdhfepa.c +++ b/client/src/cmdhfepa.c @@ -81,7 +81,7 @@ static int CmdHFEPACollectPACENonces(const char *Cmd) { return PM3_ESOFT; } - const epa_result_t *r = (const epa_result_t *)resp.data.asBytes; + const epa_result_t *r = (const epa_result_t *)(const void *)resp.data.asBytes; if (r->step != 0) { PrintAndLogEx(FAILED, "Error in step %u, Return code: %d", r->step, r->func_return); @@ -211,7 +211,7 @@ static int CmdHFEPAPACEReplay(const char *Cmd) { return PM3_ESOFT; } - const epa_result_t *rr = (const epa_result_t *)resp.data.asBytes; + const epa_result_t *rr = (const epa_result_t *)(const void *)resp.data.asBytes; if (rr->step != 0) { PrintAndLogEx(SUCCESS, "\nPACE replay failed in step %u!", rr->step); @@ -273,7 +273,7 @@ static int CmdHFEPAPACESimulate(const char *Cmd) { return PM3_ESOFT; } - const epa_result_t *sr = (const epa_result_t *)resp.data.asBytes; + const epa_result_t *sr = (const epa_result_t *)(const void *)resp.data.asBytes; const uint32_t *data = sr->timings; if (sr->step != 0) {