mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Add a dummy usage of a pointer in tests
This way clang with O1 doesn't optimize it. Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
@ -201,6 +201,8 @@ void check_mbedtls_calloc_overallocation(int num, int size)
|
|||||||
{
|
{
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
buf = mbedtls_calloc((size_t) num, (size_t) size);
|
buf = mbedtls_calloc((size_t) num, (size_t) size);
|
||||||
|
/* Dummy usage of the pointer to prevent optimizing it */
|
||||||
|
mbedtls_printf("calloc pointer : %p\n", buf);
|
||||||
TEST_ASSERT(buf == NULL);
|
TEST_ASSERT(buf == NULL);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
Reference in New Issue
Block a user