mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 20:40:10 +01:00
[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:
parent
58963a2bf9
commit
a06af40c35
7 changed files with 12 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue