mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-03 09:47:47 +00:00
Use named initializers, not {0}
This fixes -Wmissing-field-initializers complaints from Clang <=3.x. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
@@ -102,42 +102,42 @@ const char *mbedtls_test_helper_is_psa_leaking(void)
|
||||
|
||||
psa_hash_operation_t psa_hash_operation_init_short(void)
|
||||
{
|
||||
psa_hash_operation_t operation = {0};
|
||||
psa_hash_operation_t operation = PSA_HASH_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
psa_mac_operation_t psa_mac_operation_init_short(void)
|
||||
{
|
||||
psa_mac_operation_t operation = {0};
|
||||
psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
psa_cipher_operation_t psa_cipher_operation_init_short(void)
|
||||
{
|
||||
psa_cipher_operation_t operation = {0};
|
||||
psa_cipher_operation_t operation = PSA_CIPHER_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
psa_aead_operation_t psa_aead_operation_init_short(void)
|
||||
{
|
||||
psa_aead_operation_t operation = {0};
|
||||
psa_aead_operation_t operation = PSA_AEAD_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
psa_key_derivation_operation_t psa_key_derivation_operation_init_short(void)
|
||||
{
|
||||
psa_key_derivation_operation_t operation = {0};
|
||||
psa_key_derivation_operation_t operation = PSA_KEY_DERIVATION_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
psa_pake_operation_t psa_pake_operation_init_short(void)
|
||||
{
|
||||
psa_pake_operation_t operation = {0};
|
||||
psa_pake_operation_t operation = PSA_PAKE_OPERATION_INIT;
|
||||
memset(&operation.computation_stage, '!', sizeof(operation.computation_stage));
|
||||
memset(&operation.data, '!', sizeof(operation.data));
|
||||
return operation;
|
||||
@@ -145,14 +145,16 @@ psa_pake_operation_t psa_pake_operation_init_short(void)
|
||||
|
||||
psa_sign_hash_interruptible_operation_t psa_sign_hash_interruptible_operation_init_short(void)
|
||||
{
|
||||
psa_sign_hash_interruptible_operation_t operation = {0};
|
||||
psa_sign_hash_interruptible_operation_t operation =
|
||||
PSA_SIGN_HASH_INTERRUPTIBLE_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
psa_verify_hash_interruptible_operation_t psa_verify_hash_interruptible_operation_init_short(void)
|
||||
{
|
||||
psa_verify_hash_interruptible_operation_t operation = {0};
|
||||
psa_verify_hash_interruptible_operation_t operation =
|
||||
PSA_VERIFY_HASH_INTERRUPTIBLE_OPERATION_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
@@ -160,7 +162,7 @@ psa_verify_hash_interruptible_operation_t psa_verify_hash_interruptible_operatio
|
||||
#if defined(PSA_KEY_AGREEMENT_IOP_INIT)
|
||||
psa_key_agreement_iop_t psa_key_agreement_iop_init_short(void)
|
||||
{
|
||||
psa_key_agreement_iop_t operation = {0};
|
||||
psa_key_agreement_iop_t operation = PSA_KEY_AGREEMENT_IOP_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
@@ -169,7 +171,7 @@ psa_key_agreement_iop_t psa_key_agreement_iop_init_short(void)
|
||||
#if defined(PSA_GENERATE_KEY_IOP_INIT)
|
||||
psa_generate_key_iop_t psa_generate_key_iop_init_short(void)
|
||||
{
|
||||
psa_generate_key_iop_t operation = {0};
|
||||
psa_generate_key_iop_t operation = PSA_GENERATE_KEY_IOP_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
@@ -178,7 +180,7 @@ psa_generate_key_iop_t psa_generate_key_iop_init_short(void)
|
||||
#if defined(PSA_EXPORT_PUBLIC_KEY_IOP_INIT)
|
||||
psa_export_public_key_iop_t psa_export_public_key_iop_init_short(void)
|
||||
{
|
||||
psa_export_public_key_iop_t operation = {0};
|
||||
psa_export_public_key_iop_t operation = PSA_EXPORT_PUBLIC_KEY_IOP_INIT;
|
||||
memset(&operation.ctx, '!', sizeof(operation.ctx));
|
||||
return operation;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user