diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-09-15 15:00:54 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2015-09-17 09:10:26 +0800 |
commit | a1608eff6cabeac34d47ce9f3f23f7c032f493ce (patch) | |
tree | 8a8c5b005a26d3ea106e695100672cc416ad7636 | |
parent | 5abdbcc42d45384c745695d374c460dd21cda450 (diff) | |
download | gdk-pixbuf-a1608eff6cabeac34d47ce9f3f23f7c032f493ce.tar.gz |
io-png.c: Fix GCCism
Commit 8714ab4 introduced a GCCism by doing pointer arithmetic on a
gpointer, which is not allowed by other compilers. Fix that by
casting the pointer used in the addition.
-rw-r--r-- | gdk-pixbuf/io-png.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c index 5690875ec..e5ab22bcb 100644 --- a/gdk-pixbuf/io-png.c +++ b/gdk-pixbuf/io-png.c @@ -327,7 +327,7 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error) rows = g_new (png_bytep, h); - for (i = 0, ptr = pixbuf->pixels; i < h; i++, ptr += pixbuf->rowstride) + for (i = 0, ptr = pixbuf->pixels; i < h; i++, ptr = (guchar *) ptr + pixbuf->rowstride) rows[i] = ptr; png_read_image (png_ptr, rows); |