diff options
author | David Hows <howsdav@gmail.com> | 2016-05-24 17:19:24 +1000 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2016-05-24 17:19:24 +1000 |
commit | 6f3fdd2444beccd2fe15a33aa4fd01aaed556e4e (patch) | |
tree | 55d9241542b8112dca8765b66b1e0901d10e2106 /test | |
parent | f6f86961a49894bb1b72c4c4d2cdca5c0d0ea9e4 (diff) | |
download | mongo-6f3fdd2444beccd2fe15a33aa4fd01aaed556e4e.tar.gz |
WT-2656 Fix GCC 4.7 compiler warnings (#2743)
Diffstat (limited to 'test')
-rw-r--r-- | test/csuite/wt1965_col_efficiency/main.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/test/csuite/wt1965_col_efficiency/main.c b/test/csuite/wt1965_col_efficiency/main.c index a7ea174460d..daf2b491063 100644 --- a/test/csuite/wt1965_col_efficiency/main.c +++ b/test/csuite/wt1965_col_efficiency/main.c @@ -55,11 +55,12 @@ static void TEST_OPTS *opts; WT_CURSOR *cursor, *idx_cursor; WT_SESSION *session; - uint64_t *obj_data, thr_idx, ts = g_ts; - int i, o, r; + uint64_t i, ins_rotor, ins_thr_idx, thr_idx, ts; + uint64_t *obj_data; opts = (TEST_OPTS *)arg; thr_idx = __wt_atomic_fetch_addv64(&opts->next_threadid, 1); + ts = g_ts; obj_data = calloc( (NR_OBJECTS/NR_THREADS + 1) * NR_FIELDS, sizeof(*obj_data)); @@ -71,14 +72,14 @@ static void testutil_check(session->open_cursor( session, "table:index", NULL, NULL, &idx_cursor)); - for (r = 1; r < 10; ++r) { - for (o = thr_idx, i = 0; - o < NR_OBJECTS; o += NR_THREADS, i += NR_FIELDS) { + for (ins_rotor = 1; ins_rotor < 10; ++ins_rotor) { + for (ins_thr_idx = thr_idx, i = 0; ins_thr_idx < NR_OBJECTS; + ins_thr_idx += NR_THREADS, i += NR_FIELDS) { testutil_check( session->begin_transaction(session, "sync=false")); - cursor->set_key(cursor, ((uint64_t)o) << 40 | r); + cursor->set_key(cursor, ins_thr_idx << 40 | ins_rotor); cursor->set_value(cursor, ts, obj_data[i+0], obj_data[i+1], obj_data[i+2], obj_data[i+3], obj_data[i+4], obj_data[i+5], @@ -86,16 +87,17 @@ static void testutil_check(cursor->insert(cursor)); idx_cursor->set_key( - idx_cursor, ((uint64_t)o) << 40 | ts); - idx_cursor->set_value(idx_cursor, r); + idx_cursor, ins_thr_idx << 40 | ts); + idx_cursor->set_value(idx_cursor, ins_rotor); testutil_check(idx_cursor->insert(idx_cursor)); testutil_check( session->commit_transaction(session, NULL)); /* change object fields */ - ++obj_data[i + ((o + r) % NR_FIELDS)]; - ++obj_data[i + ((o + r + 1) % NR_FIELDS)]; + ++obj_data[i + ((ins_thr_idx + ins_rotor) % NR_FIELDS)]; + ++obj_data[i + + ((ins_thr_idx + ins_rotor + 1) % NR_FIELDS)]; ++g_ts; /* 5K updates/sec */ |