mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 18:46:37 +08:00
Fix compiler warnings (#6023)
This commit is contained in:
@@ -129,7 +129,7 @@ int rt_hwcrypto_bignum_export_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int
|
||||
return 0;
|
||||
}
|
||||
rt_memset(buf, 0, len);
|
||||
cp_len = n->total > len ? len : n->total;
|
||||
cp_len = (int)n->total > len ? len : (int)n->total;
|
||||
for(i = cp_len, j = 0; i > 0; i--, j++)
|
||||
{
|
||||
buf[i - 1] = n->p[j];
|
||||
@@ -156,7 +156,7 @@ int rt_hwcrypto_bignum_import_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (n->total < len)
|
||||
if ((int)n->total < len)
|
||||
{
|
||||
temp_p = rt_malloc(len);
|
||||
if (temp_p == RT_NULL)
|
||||
@@ -170,7 +170,7 @@ int rt_hwcrypto_bignum_import_bin(struct hw_bignum_mpi *n, rt_uint8_t *buf, int
|
||||
|
||||
n->sign = 1;
|
||||
rt_memset(n->p, 0, n->total);
|
||||
cp_len = n->total > len ? len : n->total;
|
||||
cp_len = (int)n->total > len ? len : n->total;
|
||||
|
||||
for(i = cp_len, j = 0; i > 0; i--, j++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user