[gdk-pixbuf] io-png.c: Fix GCCism
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf] io-png.c: Fix GCCism
- Date: Thu, 17 Sep 2015 01:10:39 +0000 (UTC)
commit a1608eff6cabeac34d47ce9f3f23f7c032f493ce
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Sep 15 15:00:54 2015 +0800
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.
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 5690875..e5ab22b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]