Fix various instances of -Wsign-compare.

This commit is contained in:
Augustin Cavalier 2018-11-24 17:48:02 -05:00
parent f6fe382433
commit d520204085
4 changed files with 39 additions and 39 deletions

View File

@ -176,6 +176,6 @@ mem_map_target(off_t position, size_t length, uint32 protection,
if (area < 0)
return area;
*virtualAddress += offset;
*virtualAddress = (void*)((addr_t)(*virtualAddress) + offset);
return area;
}

View File

@ -943,7 +943,7 @@ fs_readdir(fs_volume *_volume, fs_vnode *_node, void *_cookie,
struct dirent *buf, size_t bufsize, uint32 *num)
{
nfs_cookie *cookie = (nfs_cookie *)_cookie;
int32 max = *num;
uint32 max = *num;
int32 eof;
fs_nspace *ns;

View File

@ -28,7 +28,7 @@
atomic_set((int32 *)(ptr), 0)
#define atomic_cmpset_int(ptr, old, new) \
(atomic_test_and_set((int32 *)(ptr), new, old) == old)
(atomic_test_and_set((int32 *)(ptr), new, old) == (int32)old)
#define atomic_add_32 atomic_add_int
#define atomic_subtract_32 atomic_subtract_int

View File

@ -2551,7 +2551,7 @@ div_long(u32 s)
div <<= 1;
carry = (l_dvd >= l_s) ? 0 : 1;
if (h_dvd < (h_s + carry)) {
if (h_dvd < (s32)(h_s + carry)) {
h_s >>= 1;
l_s = s << (--counter);
continue;