don't special case get_digit_count for SP, i.e. eliminate sp_get_digit_count(), to fix -Waddress in sp_get_digit_count macro use in api.c:test_get_digit_count() (sp_get_digit_count() was a non-inline function before commit 91d23d3f5a (sp-math-all)).

pull/3566/head
Daniel Pouzzner 2020-12-14 20:14:39 -06:00
parent 70808647ef
commit 87e5b55033
2 changed files with 0 additions and 8 deletions

View File

@ -71,7 +71,6 @@
#endif #endif
#if (!defined(WOLFSSL_SP_MATH) && !defined(WOLFSSL_SP_MATH_ALL))
int get_digit_count(mp_int* a) int get_digit_count(mp_int* a)
{ {
if (a == NULL) if (a == NULL)
@ -79,7 +78,6 @@ int get_digit_count(mp_int* a)
return a->used; return a->used;
} }
#endif
mp_digit get_digit(mp_int* a, int n) mp_digit get_digit(mp_int* a, int n)
{ {

View File

@ -558,11 +558,6 @@ typedef struct sp_ecc_ctx {
} \ } \
a->used = ii + 1; \ a->used = ii + 1; \
} while (0) } while (0)
/* Get the count of digits in the multi-precision number.
*
* @param [in] a SP integer to use.
*/
#define sp_get_digit_count(a) (((a) == NULL) ? 0 : ((sp_int*)(a))->used)
/* Check the compiled and linked math implementation are the same. /* Check the compiled and linked math implementation are the same.
* Use the number of bits in a digit as indication of how code was compiled. * Use the number of bits in a digit as indication of how code was compiled.
@ -819,7 +814,6 @@ WOLFSSL_API word32 CheckRunTimeFastMath(void);
#define mp_abs sp_abs #define mp_abs sp_abs
#define mp_isneg sp_isneg #define mp_isneg sp_isneg
#define mp_clamp sp_clamp #define mp_clamp sp_clamp
#define get_digit_count sp_get_digit_count
/* One to one mappings. */ /* One to one mappings. */
#define mp_init sp_init #define mp_init sp_init