Skip to content
Browse files

test: fix signed/unsigned comparison warnings

  • Loading branch information...
1 parent 9c7ae2e commit 894a8523cb0b363dbcca404a758d1af551298e3c @bnoordhuis bnoordhuis committed
Showing with 9 additions and 7 deletions.
  1. +1 −1 test/benchmark-fs-stat.c
  2. +3 −3 test/benchmark-udp-pummel.c
  3. +1 −1 test/test-poll.c
  4. +2 −1 test/test-stdio-over-pipes.c
  5. +2 −1 test/test-timer.c
View
2 test/benchmark-fs-stat.c
@@ -45,7 +45,7 @@ struct async_req {
static void warmup(const char* path) {
uv_fs_t reqs[MAX_CONCURRENT_REQS];
- int i;
+ unsigned int i;
/* warm up the thread pool */
for (i = 0; i < ARRAY_SIZE(reqs); i++)
View
6 test/benchmark-udp-pummel.c
@@ -143,13 +143,13 @@ static void timeout_cb(uv_timer_t* timer, int status) {
}
-static int do_packet_storm(int n_senders,
- int n_receivers,
+static int do_packet_storm(unsigned int n_senders,
+ unsigned int n_receivers,
unsigned long timeout) {
uv_timer_t timer_handle;
uint64_t duration;
uv_loop_t* loop;
- int i;
+ unsigned int i;
ASSERT(n_senders <= ARRAY_SIZE(senders));
ASSERT(n_receivers <= ARRAY_SIZE(receivers));
View
2 test/test-poll.c
@@ -205,7 +205,7 @@ static void destroy_connection_context(connection_context_t* context) {
static void connection_poll_cb(uv_poll_t* handle, int status, int events) {
connection_context_t* context = (connection_context_t*) handle->data;
- int new_events;
+ unsigned int new_events;
int r;
ASSERT(status == 0);
View
3 test/test-stdio-over-pipes.c
@@ -196,7 +196,8 @@ int stdio_over_pipes_helper() {
uv_write_t write_req[ARRAY_SIZE(buffers)];
uv_buf_t buf[ARRAY_SIZE(buffers)];
- int r, i;
+ unsigned int i;
+ int r;
uv_loop_t* loop = uv_default_loop();
ASSERT(UV_NAMED_PIPE == uv_guess_handle(0));
View
3 test/test-timer.c
@@ -90,7 +90,8 @@ TEST_IMPL(timer) {
uv_timer_t once_timers[10];
uv_timer_t *once;
uv_timer_t repeat, never;
- int i, r;
+ unsigned int i;
+ int r;
start_time = uv_now(uv_default_loop());
ASSERT(0 < start_time);

0 comments on commit 894a852

Please sign in to comment.
Something went wrong with that request. Please try again.