[test] Fix warnings in tests on 64-bit systems

Cast argiments from size_t to int.  size_t is 64-bit on 64-bit systems,
which causes a warning.  The actual data should fit 32 bit comfortably.
This commit is contained in:
Pavel Roskin 2006-08-13 04:47:11 -04:00 committed by Behdad Esfahbod
parent 58963a2bf9
commit a06af40c35
7 changed files with 12 additions and 12 deletions

View file

@ -1890,7 +1890,7 @@ cairo_test_expecting (cairo_test_t *test,
}
if (!found) {
fprintf (stderr, "Cannot test target '%.*s'\n", end - tname, tname);
fprintf (stderr, "Cannot test target '%.*s'\n", (int)(end - tname), tname);
exit(-1);
}

View file

@ -180,14 +180,14 @@ draw (cairo_t *cr, int width, int height)
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", op, j);
cairo_test_log ("%d %d HERE!\n", op, (int)j);
cairo_restore (cr);
}
}
if (cairo_status (cr) != CAIRO_STATUS_SUCCESS)
cairo_test_log ("%d %d .HERE!\n", op, j);
cairo_test_log ("%d %d .HERE!\n", op, (int)j);
return CAIRO_TEST_SUCCESS;
}

View file

@ -189,14 +189,14 @@ draw (cairo_t *cr, int width, int height)
pattern_funcs[i] (cr, x, y);
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
cairo_test_log ("%d %d HERE!\n", (int)i, (int)j);
cairo_restore (cr);
}
}
if (cairo_status (cr) != CAIRO_STATUS_SUCCESS)
cairo_test_log ("%d %d .HERE!\n", i, j);
cairo_test_log ("%d %d .HERE!\n", (int)i, (int)j);
return CAIRO_TEST_SUCCESS;
}

View file

@ -228,14 +228,14 @@ draw (cairo_t *cr, int width, int height)
pattern_funcs[i] (cr, x, y);
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
cairo_test_log ("%d %d HERE!\n", (int)i, (int)j);
cairo_restore (cr);
}
}
if (cairo_status (cr) != CAIRO_STATUS_SUCCESS)
cairo_test_log ("%d %d .HERE!\n", i, j);
cairo_test_log ("%d %d .HERE!\n", (int)i, (int)j);
return CAIRO_TEST_SUCCESS;
}

View file

@ -191,7 +191,7 @@ draw (cairo_t *cr, int width, int height)
pattern_funcs[i] (cr, x, y);
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
cairo_test_log ("%d %d HERE!\n", (int)i, (int)j);
cairo_restore (cr);
}
@ -199,7 +199,7 @@ draw (cairo_t *cr, int width, int height)
}
if (cairo_status (cr) != CAIRO_STATUS_SUCCESS)
cairo_test_log ("%d %d .HERE!\n", i, j);
cairo_test_log ("%d %d .HERE!\n", (int)i, (int)j);
return CAIRO_TEST_SUCCESS;
}

View file

@ -42,7 +42,7 @@ main (void)
#define check(st, sz) \
if (sizeof (st) != (sz)) { \
cairo_test_log ("sizeof (%s): got %d, expected %d", #st, sizeof (st), sz); \
cairo_test_log ("sizeof (%s): got %d, expected %d", #st, (int)sizeof (st), sz); \
ret = CAIRO_TEST_FAILURE; \
}

View file

@ -176,14 +176,14 @@ draw (cairo_t *cr, int width, int height)
draw_funcs[j] (cr, x, y);
if (cairo_status (cr))
cairo_test_log ("%d %d HERE!\n", i, j);
cairo_test_log ("%d %d HERE!\n", (int)i, (int)j);
cairo_restore (cr);
}
}
if (cairo_status (cr) != CAIRO_STATUS_SUCCESS)
cairo_test_log ("%d %d .HERE!\n", i, j);
cairo_test_log ("%d %d .HERE!\n", (int)i, (int)j);
return CAIRO_TEST_SUCCESS;
}