[cairo-commit] Branch '1.8' - test/any2ppm.c

Chris Wilson ickle at kemper.freedesktop.org
Wed Jun 3 14:53:38 PDT 2009


 test/any2ppm.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3914c8e5b2181dd2ca5c1d3212f26268f508d6e9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jun 3 22:52:58 2009 +0100

    [test] fix bad merge in previous commit
    
    Missed the conversion of row from char to int.

diff --git a/test/any2ppm.c b/test/any2ppm.c
index 3b590d9..5ab98c4 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -196,13 +196,13 @@ write_ppm (cairo_surface_t *surface, int fd)
 
     len = sprintf (buf, "%s %d %d 255\n", format_str, width, height);
     for (j = 0; j < height; j++) {
-	const unsigned char *row = data + stride * j;
+	const unsigned int *row = (unsigned int *) (data + stride * j);
 
 	switch ((int) format) {
 	case CAIRO_FORMAT_ARGB32:
 	    len = _write (fd,
 			  buf, sizeof (buf), len,
-			  row, 4 * width);
+			  (unsigned char *) row, 4 * width);
 	    break;
 	case CAIRO_FORMAT_RGB24:
 	    for (i = 0; i < width; i++) {
@@ -219,7 +219,7 @@ write_ppm (cairo_surface_t *surface, int fd)
 	case CAIRO_FORMAT_A8:
 	    len = _write (fd,
 			  buf, sizeof (buf), len,
-			  row, width);
+			  (unsigned char *) row, width);
 	    break;
 	}
 	if (len < 0)


More information about the cairo-commit mailing list