test: fix some warnings when compiling tests (#3816)
```
warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
note: in expansion of macro 'ASSERT_BASE'
#define ASSERT_EQ(a, b) ASSERT_BASE(a, ==, b, int64_t, PRId64)
warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but
argument 3 has type ‘uint32_t’ {aka ‘unsigned int’}
```
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
This commit is contained in:
parent
61e0bbda6b
commit
a4ba1bd73e
@ -104,13 +104,13 @@ TEST_IMPL(utf8_decode1_overrun) {
|
|||||||
p = b;
|
p = b;
|
||||||
b[0] = 0x7F;
|
b[0] = 0x7F;
|
||||||
ASSERT_EQ(0x7F, uv__utf8_decode1(&p, b + 1));
|
ASSERT_EQ(0x7F, uv__utf8_decode1(&p, b + 1));
|
||||||
ASSERT_EQ(p, b + 1);
|
ASSERT_PTR_EQ(p, b + 1);
|
||||||
|
|
||||||
/* Multi-byte. */
|
/* Multi-byte. */
|
||||||
p = b;
|
p = b;
|
||||||
b[0] = 0xC0;
|
b[0] = 0xC0;
|
||||||
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + 1));
|
ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + 1));
|
||||||
ASSERT_EQ(p, b + 1);
|
ASSERT_PTR_EQ(p, b + 1);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -103,7 +103,7 @@ TEST_IMPL(ip6_addr_link_local) {
|
|||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
||||||
ASSERT(0 == uv_ip6_addr(scoped_addr, TEST_PORT, &addr));
|
ASSERT(0 == uv_ip6_addr(scoped_addr, TEST_PORT, &addr));
|
||||||
fprintf(stderr, "Got scope_id 0x%02x\n", addr.sin6_scope_id);
|
fprintf(stderr, "Got scope_id 0x%2x\n", (unsigned)addr.sin6_scope_id);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
ASSERT(iface_index == addr.sin6_scope_id);
|
ASSERT(iface_index == addr.sin6_scope_id);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user