Skip to content

Commit fe0f97a

Browse files
committed
[nrf toup] ecp.c: fix warnings
Fix label and function defined but unused warnings. To be checked and sent upstream. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
1 parent 8cf32d8 commit fe0f97a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

legacy_sub/src/ecp.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ int mbedtls_ecp_check_budget(const mbedtls_ecp_group *grp,
281281

282282
#endif /* MBEDTLS_ECP_RESTARTABLE */
283283

284-
#if defined(MBEDTLS_ECP_C)
284+
#if defined(MBEDTLS_ECP_C) && \
285+
(defined(MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED) || \
286+
defined(MBEDTLS_ECP_MONTGOMERY_ENABLED))
285287
static void mpi_init_many(mbedtls_mpi *arr, size_t size)
286288
{
287289
while (size--) {
@@ -295,7 +297,7 @@ static void mpi_free_many(mbedtls_mpi *arr, size_t size)
295297
mbedtls_mpi_free(arr++);
296298
}
297299
}
298-
#endif /* MBEDTLS_ECP_C */
300+
#endif
299301

300302
/*
301303
* List of supported curves:
@@ -708,6 +710,7 @@ int mbedtls_ecp_point_write_binary(const mbedtls_ecp_group *grp,
708710
}
709711
#endif
710712

713+
(void)&&cleanup;
711714
cleanup:
712715
return ret;
713716
}
@@ -787,6 +790,7 @@ int mbedtls_ecp_point_read_binary(const mbedtls_ecp_group *grp,
787790
}
788791
#endif
789792

793+
(void)&&cleanup;
790794
cleanup:
791795
return ret;
792796
}

0 commit comments

Comments
 (0)