mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 05:45:38 +01:00
Fix build with gcc -O -Wall
Fix warnings from gcc -O -Wall about `ret` used uninitialized in CMAC selftest auxiliary functions. The variable was indeed uninitialized if the function was called with num_tests=0 (which never happens).
This commit is contained in:
parent
0afe624fff
commit
df761d5a6b
@ -832,6 +832,7 @@ static int cmac_test_subkeys( int verbose,
|
|||||||
mbedtls_cipher_free( &ctx );
|
mbedtls_cipher_free( &ctx );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@ -887,6 +888,7 @@ static int cmac_test_wth_cipher( int verbose,
|
|||||||
if( verbose != 0 )
|
if( verbose != 0 )
|
||||||
mbedtls_printf( "passed\n" );
|
mbedtls_printf( "passed\n" );
|
||||||
}
|
}
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return( ret );
|
return( ret );
|
||||||
|
Loading…
Reference in New Issue
Block a user