Suppress -Wsign-compare warning on a few places

This commit is contained in:
YAMAMOTO Takashi
2022-12-26 15:08:00 +09:00
committed by Xiang Xiao
parent dd32eccfc3
commit bf7db14feb
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -89,7 +89,7 @@ static int lib_numeric_address(FAR const char *name,
FAR struct hostent_info_s *info; FAR struct hostent_info_s *info;
FAR char *ptr; FAR char *ptr;
socklen_t addrlen; socklen_t addrlen;
int namelen; size_t namelen;
int ret; int ret;
/* Verify that we have a buffer big enough to get started (it still may not /* Verify that we have a buffer big enough to get started (it still may not
@@ -320,7 +320,7 @@ static int lib_find_answer(FAR const char *name, FAR struct hostent_s *host,
socklen_t addrlen; socklen_t addrlen;
int naddr; int naddr;
int addrtype; int addrtype;
int namelen; size_t namelen;
int ret; int ret;
int i; int i;
@@ -466,7 +466,7 @@ static int lib_dns_lookup(FAR const char *name, FAR struct hostent_s *host,
socklen_t addrlen; socklen_t addrlen;
int naddr; int naddr;
int addrtype; int addrtype;
int namelen; size_t namelen;
int ret; int ret;
int i; int i;
+2 -2
View File
@@ -91,7 +91,7 @@ mempool_multiple_find(FAR struct mempool_multiple_s *mpool, size_t size)
int mempool_multiple_init(FAR struct mempool_multiple_s *mpool, int mempool_multiple_init(FAR struct mempool_multiple_s *mpool,
FAR const char *name) FAR const char *name)
{ {
int i; size_t i;
DEBUGASSERT(mpool != NULL && mpool->pools != NULL); DEBUGASSERT(mpool != NULL && mpool->pools != NULL);
@@ -359,7 +359,7 @@ void mempool_multiple_fixed_free(FAR struct mempool_multiple_s *mpool,
int mempool_multiple_deinit(FAR struct mempool_multiple_s *mpool) int mempool_multiple_deinit(FAR struct mempool_multiple_s *mpool)
{ {
int i; size_t i;
DEBUGASSERT(mpool != NULL); DEBUGASSERT(mpool != NULL);
+2 -2
View File
@@ -68,7 +68,7 @@ static void mallinfo_handler(FAR struct mm_allocnode_s *node, FAR void *arg)
info->ordblks++; info->ordblks++;
info->fordblks += node->size; info->fordblks += node->size;
if (node->size > info->mxordblk) if (node->size > (size_t)info->mxordblk)
{ {
info->mxordblk = node->size; info->mxordblk = node->size;
} }
@@ -123,7 +123,7 @@ int mm_mallinfo(FAR struct mm_heap_s *heap, FAR struct mallinfo *info)
info->arena = heap->mm_heapsize; info->arena = heap->mm_heapsize;
info->uordblks += region * SIZEOF_MM_ALLOCNODE; /* account for the tail node */ info->uordblks += region * SIZEOF_MM_ALLOCNODE; /* account for the tail node */
DEBUGASSERT(info->uordblks + info->fordblks == heap->mm_heapsize); DEBUGASSERT((size_t)info->uordblks + info->fordblks == heap->mm_heapsize);
return OK; return OK;
} }