modules: openthread: fix unused variable during otPlatCryptoInit

If asserts are disabled, there is a warning in 'otPlatCryptoInit'
regarding unused variable `err`. This commit fixes that.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
This commit is contained in:
Maciej Baczmanski 2023-09-05 07:32:03 +02:00 committed by Fabio Baltieri
commit d2495b14f2

View file

@ -137,9 +137,8 @@ void otPlatCryptoInit(void)
* PSA with emulated TFM, Settings have to be initialized at the end of otPlatCryptoInit(),
* to be available before storing Network Key.
*/
int err = settings_subsys_init();
__ASSERT(!err, "Failed to initialize settings");
__ASSERT_EVAL((void) settings_subsys_init(), int err = settings_subsys_init(),
!err, "Failed to initialize settings");
#endif
}