Use casts when doing nonstandard pointer conversions
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
6848d1709b
commit
6aa9f32124
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ void null_pointer_dereference(const char *name)
|
|||
{
|
||||
(void) name;
|
||||
volatile char *p;
|
||||
mbedtls_platform_zeroize(&p, sizeof(p));
|
||||
mbedtls_platform_zeroize((void *) &p, sizeof(p));
|
||||
mbedtls_printf("%p -> %u\n", p, (unsigned) *p);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ void null_pointer_call(const char *name)
|
|||
(void) name;
|
||||
unsigned (*p)(void);
|
||||
mbedtls_platform_zeroize(&p, sizeof(p));
|
||||
mbedtls_printf("%p() -> %u\n", p, p());
|
||||
mbedtls_printf("%p() -> %u\n", (void *) p, p());
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue