test: fix signed/unsigned comparison warnings

This commit is contained in:
Ben Noordhuis 2012-11-02 14:32:14 +01:00
parent 9c7ae2e7a3
commit 894a8523cb
5 changed files with 9 additions and 7 deletions

View File

@ -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 File

@ -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 File

@ -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 File

@ -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 File

@ -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);