From 599700561191916265d0c826ad6c047511dbe3d6 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 28 Feb 2019 13:12:06 +0100 Subject: [PATCH] Fix unused variables in Montgomery-only configuration Signed-off-by: Gilles Peskine --- library/ecp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/ecp.c b/library/ecp.c index f44298ab8..0c901b0ac 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -879,6 +879,7 @@ int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, plen = mbedtls_mpi_size( &grp->P ); #if defined(MBEDTLS_ECP_MONTGOMERY_ENABLED) + (void) format; /* Montgomery curves always use the same point format */ if( mbedtls_ecp_get_type( grp ) == MBEDTLS_ECP_TYPE_MONTGOMERY ) { *olen = plen; @@ -2653,6 +2654,8 @@ int mbedtls_ecp_mul_restartable( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, /* reset ops count for this call if top-level */ if( rs_ctx != NULL && rs_ctx->depth++ == 0 ) rs_ctx->ops_done = 0; +#else + (void) rs_ctx; #endif #if defined(MBEDTLS_ECP_INTERNAL_ALT)