diff options
author | Carl Worth <cworth@cworth.org> | 2005-04-02 05:18:11 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-04-02 05:18:11 +0000 |
commit | 9e405876e86ce004cd69b87a10c1bf7ce7d1b436 (patch) | |
tree | d4d5e3c4244559799b2500fa5caee40c4a619779 /src/cairo-png.c | |
parent | 7636e901841a800dd5d032963fca6a7c9ef1be99 (diff) |
Style and indentation fixes.
cast to quiet new gcc-4 warnings.
Initialize variables to quiet new gcc-4 warnings.
Use unsigned char* as expected by freetype, libpng, Xlib, and zlib.
Propagate unsigned char* down from cairo_text_extents.
Diffstat (limited to 'src/cairo-png.c')
-rw-r--r-- | src/cairo-png.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-png.c b/src/cairo-png.c index f7c00801..1a4fc76f 100644 --- a/src/cairo-png.c +++ b/src/cairo-png.c @@ -106,7 +106,7 @@ cairo_surface_write_png (cairo_surface_t *surface, FILE *file) } for (i = 0; i < image->height; i++) - rows[i] = image->data + i * image->stride; + rows[i] = (png_byte *) image->data + i * image->stride; png = png_create_write_struct (PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png == NULL) { @@ -322,7 +322,7 @@ cairo_image_surface_create_for_png (FILE *file, int *width, int *height) if (height != NULL) *height = png_height; - return cairo_image_surface_create_for_data (data, CAIRO_FORMAT_ARGB32, + return cairo_image_surface_create_for_data ((char *)data, CAIRO_FORMAT_ARGB32, png_width, png_height, stride); BAIL3: |