aboutsummaryrefslogtreecommitdiff
path: root/pixman/test/composite.c
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/test/composite.c')
-rw-r--r--pixman/test/composite.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/pixman/test/composite.c b/pixman/test/composite.c
index 8b8a8f540..50a3c0644 100644
--- a/pixman/test/composite.c
+++ b/pixman/test/composite.c
@@ -426,6 +426,7 @@ calc_op (pixman_op_t op, double src, double dst, double srca, double dsta)
case PIXMAN_OP_HSL_LUMINOSITY:
default:
abort();
+ return 0; /* silence MSVC */
}
#undef mult_chan
}
@@ -617,18 +618,18 @@ eval_diff (color_t *expected, color_t *test, pixman_format_code_t format)
}
static char *
-describe_image (image_t *info, char *buf, int buflen)
+describe_image (image_t *info, char *buf)
{
if (info->size)
{
- snprintf (buf, buflen, "%s %dx%d%s",
- info->format->name,
- info->size, info->size,
- info->repeat ? "R" :"");
+ sprintf (buf, "%s %dx%d%s",
+ info->format->name,
+ info->size, info->size,
+ info->repeat ? "R" :"");
}
else
{
- snprintf (buf, buflen, "solid");
+ sprintf (buf, "solid");
}
return buf;
@@ -710,10 +711,9 @@ composite_test (image_t *dst,
{
char buf[40];
- snprintf (buf, sizeof (buf),
- "%s %scomposite",
- op->name,
- component_alpha ? "CA " : "");
+ sprintf (buf, "%s %scomposite",
+ op->name,
+ component_alpha ? "CA " : "");
printf ("%s test error of %.4f --\n"
" R G B A\n"
@@ -735,9 +735,9 @@ composite_test (image_t *dst,
mask->color->b, mask->color->a,
dst->color->r, dst->color->g,
dst->color->b, dst->color->a);
- printf ("src: %s, ", describe_image (src, buf, sizeof (buf)));
- printf ("mask: %s, ", describe_image (mask, buf, sizeof (buf)));
- printf ("dst: %s\n\n", describe_image (dst, buf, sizeof (buf)));
+ printf ("src: %s, ", describe_image (src, buf));
+ printf ("mask: %s, ", describe_image (mask, buf));
+ printf ("dst: %s\n\n", describe_image (dst, buf));
}
else
{
@@ -747,8 +747,8 @@ composite_test (image_t *dst,
src->color->b, src->color->a,
dst->color->r, dst->color->g,
dst->color->b, dst->color->a);
- printf ("src: %s, ", describe_image (src, buf, sizeof (buf)));
- printf ("dst: %s\n\n", describe_image (dst, buf, sizeof (buf)));
+ printf ("src: %s, ", describe_image (src, buf));
+ printf ("dst: %s\n\n", describe_image (dst, buf));
}
success = FALSE;