aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/profiling
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-09-10 11:47:15 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-09-10 11:47:15 -0700
commit32ca48ce0b963949ff29d2dcd526b174679779aa (patch)
treee1203e29dbc0827fe4e9eed5737b3f1589d44f34 /test/core/profiling
parentbe947697d7c5edb1f67c9df5ef024e3eaf98e9e6 (diff)
Core compiles with -Wsign-conversion
Diffstat (limited to 'test/core/profiling')
-rw-r--r--test/core/profiling/timers_test.c16
1 files changed, 8 insertions, 8 deletions
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 <stdlib.h>
#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: