Patchwork [meta-oe] gedit: fix compile

login
register
mail settings
Submitter Andreas Müller
Date March 9, 2013, 7:59 p.m.
Message ID <1362859144-336-2-git-send-email-schnitzeltony@googlemail.com>
Download mbox | patch
Permalink /patch/45813/
State Accepted, archived
Commit 5259a3e097a43fa849b70282f85b2f8617ab7181
Headers show

Comments

Andreas Müller - March 9, 2013, 7:59 p.m.
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
 .../0001-workaround-void-pointer-arithmetic.patch  |   57 ++++++++++++++++++++
 meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb     |    3 +-
 2 files changed, 59 insertions(+), 1 deletions(-)
 create mode 100644 meta-gnome/recipes-gnome/gedit/files/0001-workaround-void-pointer-arithmetic.patch

Patch

diff --git a/meta-gnome/recipes-gnome/gedit/files/0001-workaround-void-pointer-arithmetic.patch b/meta-gnome/recipes-gnome/gedit/files/0001-workaround-void-pointer-arithmetic.patch
new file mode 100644
index 0000000..a28808b
--- /dev/null
+++ b/meta-gnome/recipes-gnome/gedit/files/0001-workaround-void-pointer-arithmetic.patch
@@ -0,0 +1,57 @@ 
+From 8e0cbfac142d38320dd02416601e14c65585cd17 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Sat, 9 Mar 2013 12:47:06 +0100
+Subject: [PATCH] workaround void pointer arithmetic
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fixes errors like:
+error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ gedit/gedit-document-input-stream.c   |    4 ++--
+ gedit/gedit-smart-charset-converter.c |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gedit/gedit-document-input-stream.c b/gedit/gedit-document-input-stream.c
+index 5a1f961..38316e7 100644
+--- a/gedit/gedit-document-input-stream.c
++++ b/gedit/gedit-document-input-stream.c
+@@ -426,7 +426,7 @@ gedit_document_input_stream_read (GInputStream  *stream,
+ 
+ 	do
+ 	{
+-		n = read_line (dstream, buffer + read, space_left);
++		n = read_line (dstream, ((char*)buffer) + read, space_left);
+ 		read += n;
+ 		space_left -= n;
+ 	} while (space_left > 0 && n != 0 && dstream->priv->bytes_partial == 0);
+@@ -451,7 +451,7 @@ gedit_document_input_stream_read (GInputStream  *stream,
+ 
+ 			newline = get_new_line (dstream);
+ 
+-			memcpy (buffer + read, newline, newline_size);
++			memcpy (((char*)buffer) + read, newline, newline_size);
+ 
+ 			read += newline_size;
+ 			dstream->priv->newline_added = TRUE;
+diff --git a/gedit/gedit-smart-charset-converter.c b/gedit/gedit-smart-charset-converter.c
+index e32b0b1..6745ce3 100644
+--- a/gedit/gedit-smart-charset-converter.c
++++ b/gedit/gedit-smart-charset-converter.c
+@@ -153,7 +153,7 @@ try_convert (GCharsetConverter *converter,
+ 	do
+ 	{
+ 		res = g_converter_convert (G_CONVERTER (converter),
+-		                           inbuf + nread,
++		                           ((const char*)inbuf) + nread,
+ 		                           inbuf_size - nread,
+ 		                           out + nwritten,
+ 		                           out_size - nwritten,
+-- 
+1.7.4.4
+
diff --git a/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb b/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb
index 24ce245..11e0945 100644
--- a/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb
+++ b/meta-gnome/recipes-gnome/gedit/gedit_2.30.4.bb
@@ -1,13 +1,14 @@ 
 DESCRIPTION = "GNOME editor"
 SECTION = "x11/gnome"
 LICENSE = "GPLv2+"
-PR = "r1"
+PR = "r2"
 
 DEPENDS = "gvfs enchant gconf gnome-doc-utils gnome-doc-utils-native glib-2.0 gtk+ gtksourceview2 iso-codes"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 inherit gnome gettext pythonnative
+SRC_URI+= "file://0001-workaround-void-pointer-arithmetic.patch"
 SRC_URI[archive.md5sum] = "e1eecb0a92a1a363b3d375ec5ac0fb3b"
 SRC_URI[archive.sha256sum] = "a561fe3dd1d199baede1bd07c4ee65f06fc7c494dd4d3327117f04149a608e3c"