Don't use %llx in printf

We still do MinGW builds on our CI whose printf doesn't support it!

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-11-03 10:58:57 +01:00
parent a1dfa14c06
commit f0d5cf9a0c

View File

@ -54,7 +54,10 @@ void null_pointer_call(const char *name)
(void) name;
unsigned (*p)(void);
mbedtls_platform_zeroize(&p, sizeof(p));
mbedtls_printf("%llx() -> %u\n", (unsigned long long) (uintptr_t) p, p());
/* The pointer representation may be truncated, but we don't care:
* the only point of printing it is to have some use of the pointer
* to dissuade the compiler from optimizing it away. */
mbedtls_printf("%lx() -> %u\n", (unsigned long) (uintptr_t) p, p());
}