test: fix -Wtautological-pointer-compare warnings
~~~~ test/test-get-loadavg.c:30:14: warning: comparison of array 'avg' not equal to a null pointer is always true [-Wtautological-pointer-compare] test/test-getnameinfo.c:76:18: warning: comparison of array 'req.host' not equal to a null pointer is always true [-Wtautological-pointer-compare] test/test-getnameinfo.c:77:18: warning: comparison of array 'req.service' not equal to a null pointer is always true [-Wtautological-pointer-compare] ~~~~ PR-URL: https://github.com/libuv/libuv/pull/622 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
9bbc1137ee
commit
5f15f72cca
@ -24,10 +24,9 @@
|
|||||||
|
|
||||||
TEST_IMPL(get_loadavg) {
|
TEST_IMPL(get_loadavg) {
|
||||||
|
|
||||||
double avg[3];
|
double avg[3] = {-1, -1, -1};
|
||||||
uv_loadavg(avg);
|
uv_loadavg(avg);
|
||||||
|
|
||||||
ASSERT(avg != NULL);
|
|
||||||
ASSERT(avg[0] >= 0);
|
ASSERT(avg[0] >= 0);
|
||||||
ASSERT(avg[1] >= 0);
|
ASSERT(avg[1] >= 0);
|
||||||
ASSERT(avg[2] >= 0);
|
ASSERT(avg[2] >= 0);
|
||||||
|
|||||||
@ -73,8 +73,8 @@ TEST_IMPL(getnameinfo_basic_ip4_sync) {
|
|||||||
NULL,
|
NULL,
|
||||||
(const struct sockaddr*)&addr4,
|
(const struct sockaddr*)&addr4,
|
||||||
0));
|
0));
|
||||||
ASSERT(req.host != NULL);
|
ASSERT(req.host[0] != '\0');
|
||||||
ASSERT(req.service != NULL);
|
ASSERT(req.service[0] != '\0');
|
||||||
|
|
||||||
MAKE_VALGRIND_HAPPY();
|
MAKE_VALGRIND_HAPPY();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user