Fix build failure in benchmark in reduced configs

The "proper" fix would be to define the function only when it's needed,
but the condition for that would be tedious to write (enumeration of all
symmetric crypto modules) and since this is a utility program, not the
core library, I think it's OK to keep unused functions.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
Manuel Pégourié-Gonnard 2022-01-04 09:47:54 +01:00
parent acc74b8413
commit a93aa580dc

View file

@ -643,6 +643,10 @@ int main( int argc, char *argv[] )
memset( buf, 0xAA, sizeof( buf ) );
memset( tmp, 0xBB, sizeof( tmp ) );
/* Avoid "unused static function" warning in configurations without
* symmetric crypto. */
(void) mbedtls_timing_hardclock( );
#if defined(MBEDTLS_MD5_C)
if( todo.md5 )
TIME_AND_TSC( "MD5", mbedtls_md5( buf, BUFSIZE, tmp ) );