3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

treewide: Fix compiler warnings

src/erp.c:134:10: error: comparison of integer expressions of different
signedness: 'unsigned int' and 'int' [-Werror=sign-compare]

src/eap-ttls.c:378:10: error: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Werror=sign-compare]
This commit is contained in:
Denis Kenzior 2022-01-26 12:20:32 -06:00
parent d22b174a73
commit b47ada02bf
2 changed files with 3 additions and 3 deletions

View File

@ -375,7 +375,7 @@ static bool avp_iter_next(struct avp_iter *iter)
len -= TTLS_AVP_HEADER_LEN; len -= TTLS_AVP_HEADER_LEN;
if (len > end - start) if ((ptrdiff_t) len > end - start)
return false; return false;
if (flags & TTLS_AVP_FLAG_V) { if (flags & TTLS_AVP_FLAG_V) {

View File

@ -114,8 +114,8 @@ static bool erp_tlv_iter_next(struct erp_tlv_iter *iter)
{ {
const unsigned char *tlv = iter->tlv + iter->pos; const unsigned char *tlv = iter->tlv + iter->pos;
const unsigned char *end = iter->tlv + iter->max; const unsigned char *end = iter->tlv + iter->max;
unsigned int tag; uint8_t tag;
unsigned int len; uint8_t len;
if (end - tlv < 2) if (end - tlv < 2)
return false; return false;