diff options
author | Andrea Canciani <ranma42@gmail.com> | 2011-03-17 09:27:02 +0100 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2011-03-17 17:35:28 +0100 |
commit | 4ef32a36ba1e457e8dd6244a6483866d33477aac (patch) | |
tree | 9bce70969ea3ddcfb86bc444814e6d144a79e031 /test/cairo-test-runner.c | |
parent | d6efb2a0b78ec8c3cc520e7a1ddebc8a5c5dc706 (diff) | |
download | cairo-4ef32a36ba1e457e8dd6244a6483866d33477aac.tar.gz |
test: Silence gcc warnings
warning: cannot optimize possibly infinite loops
gcc does not detect that the "infinite" loops are actually just one or
two iterations, depending on the has_similar value being FALSE or
TRUE. It realizes it if the iteration variable and the iteration stop
value are both enum values.
Diffstat (limited to 'test/cairo-test-runner.c')
-rw-r--r-- | test/cairo-test-runner.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cairo-test-runner.c b/test/cairo-test-runner.c index c5d09456a..87c6db0ab 100644 --- a/test/cairo-test-runner.c +++ b/test/cairo-test-runner.c @@ -909,18 +909,18 @@ main (int argc, char **argv) target_error = FALSE, target_crashed = FALSE, target_skipped = TRUE; - int has_similar; + cairo_test_similar_t has_similar; target = ctx.targets_to_test[n]; has_similar = runner.full_test ? cairo_test_target_has_similar (&ctx, target) : - 0; + DIRECT; for (m = 0; m < runner.num_device_offsets; m++) { int dev_offset = m * 25; - int similar; + cairo_test_similar_t similar; - for (similar = 0; similar <= has_similar; similar++) { + for (similar = DIRECT; similar <= has_similar; similar++) { status = _cairo_test_runner_draw (&runner, &ctx, target, similar, dev_offset); switch (status) { |