Skip to content

Commit 5b500ae

Browse files
author
Andrzej Kurek
committed
Add void casts to unused parameters
1 parent b59115c commit 5b500ae

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

atecc608a_se.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ static psa_status_t atecc608a_export_public_key(psa_drv_se_context_t *drv_contex
165165
const uint16_t slot = key;
166166
psa_status_t status = PSA_ERROR_GENERIC_ERROR;
167167

168+
(void) drv_context;
169+
168170
if (data_size < key_data_len) {
169171
return PSA_ERROR_BUFFER_TOO_SMALL;
170172
}
@@ -185,6 +187,7 @@ static psa_status_t atecc608a_export_public_key(psa_drv_se_context_t *drv_contex
185187
atecc608a_deinit();
186188
return status;
187189
}
190+
188191
static psa_status_t atecc608a_import_public_key(
189192
psa_drv_se_context_t *drv_context,
190193
psa_key_slot_number_t key_slot,
@@ -198,6 +201,7 @@ static psa_status_t atecc608a_import_public_key(
198201
psa_key_type_t type = psa_get_key_type(attributes);
199202
psa_algorithm_t alg = psa_get_key_algorithm(attributes);
200203

204+
(void) drv_context;
201205
ASSERT_SUCCESS_PSA(is_public_key_slot(key_id));
202206

203207
/* Check if the key has a size of 65 {0x04, X, Y}. */
@@ -241,6 +245,7 @@ static psa_status_t atecc608a_generate_key(
241245
psa_key_type_t type = psa_get_key_type(attributes);
242246
size_t bits = psa_get_key_bits(attributes);
243247

248+
(void) drv_context;
244249
/* The hardware has slots 0-15 */
245250
if (key_slot > 15) {
246251
return PSA_ERROR_INVALID_ARGUMENT;
@@ -288,6 +293,7 @@ static psa_status_t atecc608a_asymmetric_sign(psa_drv_se_context_t *drv_context,
288293
const uint16_t key_id = key_slot;
289294
psa_status_t status = PSA_ERROR_GENERIC_ERROR;
290295

296+
(void) drv_context;
291297
/* The driver can only do randomized ECDSA on SHA-256 */
292298
if (alg != PSA_ALG_ECDSA(PSA_ALG_SHA_256) && alg != PSA_ALG_ECDSA_ANY) {
293299
return PSA_ERROR_NOT_SUPPORTED;
@@ -332,6 +338,7 @@ psa_status_t atecc608a_asymmetric_verify(psa_drv_se_context_t *drv_context,
332338
psa_status_t status = PSA_ERROR_GENERIC_ERROR;
333339
bool is_verified = false;
334340

341+
(void) drv_context;
335342
ASSERT_SUCCESS_PSA(is_public_key_slot(key_id));
336343

337344
/* The driver can only do randomized ECDSA on SHA-256 */
@@ -399,6 +406,9 @@ static psa_status_t atecc608a_validate_slot_number(
399406
psa_key_slot_number_t key_slot)
400407
{
401408
psa_key_type_t type = psa_get_key_type(attributes);
409+
(void) drv_context;
410+
(void) method;
411+
402412
if (PSA_KEY_TYPE_IS_ECC_KEY_PAIR(type)) {
403413
if (key_slot <= 15) {
404414
return PSA_SUCCESS;
@@ -418,6 +428,12 @@ static psa_status_t atecc608a_allocate_key(
418428
psa_key_creation_method_t method,
419429
psa_key_slot_number_t *key_slot)
420430
{
431+
(void) drv_context;
432+
(void) persistent_data;
433+
(void) attributes;
434+
(void) method;
435+
(void) key_slot;
436+
421437
return PSA_SUCCESS;
422438
}
423439

0 commit comments

Comments
 (0)