From 32ca48ce0b963949ff29d2dcd526b174679779aa Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 10 Sep 2015 11:47:15 -0700 Subject: Core compiles with -Wsign-conversion --- test/core/profiling/timers_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/core/profiling') diff --git a/test/core/profiling/timers_test.c b/test/core/profiling/timers_test.c index 12b08c115e..b79cde64bd 100644 --- a/test/core/profiling/timers_test.c +++ b/test/core/profiling/timers_test.c @@ -35,22 +35,22 @@ #include #include "test/core/util/test_config.h" -void test_log_events(int num_seqs) { - int start = 0; - int *state; +void test_log_events(size_t num_seqs) { + size_t start = 0; + size_t *state; state = calloc(num_seqs, sizeof(state[0])); while (start < num_seqs) { - int i; - int row; + size_t i; + size_t row; if (state[start] == 3) { /* Already done with this posn */ start++; continue; } - row = rand() % 10; /* how many in a row */ + row = (size_t)rand() % 10; /* how many in a row */ for (i = start; (i < start + row) && (i < num_seqs); i++) { - int j; - int advance = 1 + rand() % 3; /* how many to advance by */ + size_t j; + size_t advance = 1 + (size_t)rand() % 3; /* how many to advance by */ for (j = 0; j < advance; j++) { switch (state[i]) { case 0: -- cgit v1.2.3