Bug#290309: epiphany-extensions: FTBFS (amd64/gcc-4.0): pointer targets in passing argument 1 of 'DashboardSendCluePacket' differ in signedness

Andreas Jochens Andreas Jochens <aj@andaco.de>, 290309@bugs.debian.org
Thu, 13 Jan 2005 15:40:37 +0100


Package: epiphany-extensions
Severity: normal
Tags: patch

When building 'epiphany-extensions' on amd64 with gcc-4.0,
I get the following error:

cc1: warnings being treated as errors
ephy-dashboard-extension.c: In function 'load_status_cb':
ephy-dashboard-extension.c:151: warning: pointer targets in passing argument 1 of 'DashboardSendCluePacket' differ in signedness
ephy-dashboard-extension.c:151: warning: pointer targets in passing argument 3 of 'DashboardSendCluePacket' differ in signedness
ephy-dashboard-extension.c:165: warning: pointer targets in passing argument 1 of 'DashboardSendCluePacket' differ in signedness
ephy-dashboard-extension.c:165: warning: pointer targets in passing argument 3 of 'DashboardSendCluePacket' differ in signedness
make[4]: *** [ephy-dashboard-extension.lo] Error 1
make[4]: Leaving directory `/epiphany-extensions-1.4.4/extensions/dashboard'

With the attached patch 'epiphany-extensions' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/epiphany-extensions-1.4.4/extensions/dashboard/dashboard-frontend-xmlwriter.c ./extensions/dashboard/dashboard-frontend-xmlwriter.c
--- ../tmp-orig/epiphany-extensions-1.4.4/extensions/dashboard/dashboard-frontend-xmlwriter.c	2004-09-26 18:22:39.000000000 +0200
+++ ./extensions/dashboard/dashboard-frontend-xmlwriter.c	2005-01-13 14:58:46.000000000 +0100
@@ -163,17 +163,17 @@
 	ret = xmlTextWriterStartDocument (writer, NULL, NULL, NULL);
 	if (ret < 0) goto error;
 
-	ret = xmlTextWriterStartElement (writer, "CluePacket");
+	ret = xmlTextWriterStartElement (writer, (unsigned char*) "CluePacket");
 	if (ret < 0) goto error;
 
-	ret = xmlTextWriterWriteElement (writer, "Frontend", frontend);
+	ret = xmlTextWriterWriteElement (writer, (unsigned char*) "Frontend", frontend);
 	if (ret < 0) goto error;
 
-	ret = xmlTextWriterWriteElement (writer, "Context", context);
+	ret = xmlTextWriterWriteElement (writer, (unsigned char*) "Context", context);
 	if (ret < 0) goto error;
 
-	ret = xmlTextWriterWriteElement (writer, "Focused",
-					 focused ? "true" : "false");
+	ret = xmlTextWriterWriteElement (writer, (unsigned char*) "Focused",
+					 focused ? (unsigned char*) "true" : (unsigned char*) "false");
 	if (ret < 0) goto error;
 
 error:
@@ -216,13 +216,13 @@
 	if (!writer)
 		return -1;
 
-	ret = xmlTextWriterStartElement (writer, "Clue");
+	ret = xmlTextWriterStartElement (writer, (unsigned char*) "Clue");
 	if (ret < 0) return ret;
 
-	ret = xmlTextWriterWriteAttribute (writer, "Type", type);
+	ret = xmlTextWriterWriteAttribute (writer, (unsigned char*) "Type", type);
 	if (ret < 0) return ret;
 
-	ret = xmlTextWriterWriteFormatAttribute (writer, "Relevance", "%d", relevance);
+	ret = xmlTextWriterWriteFormatAttribute (writer, (unsigned char*) "Relevance", "%d", relevance);
 	if (ret < 0) return ret;
 
 	ret = xmlTextWriterWriteString (writer, text);
diff -urN ../tmp-orig/epiphany-extensions-1.4.4/extensions/dashboard/ephy-dashboard-extension.c ./extensions/dashboard/ephy-dashboard-extension.c
--- ../tmp-orig/epiphany-extensions-1.4.4/extensions/dashboard/ephy-dashboard-extension.c	2004-09-26 18:22:39.000000000 +0200
+++ ./extensions/dashboard/ephy-dashboard-extension.c	2005-01-13 14:52:56.000000000 +0100
@@ -142,9 +142,9 @@
 			g_object_unref (persist);
 
 			DashboardSendCluePacket (
-				EPIPHANY_FRONTEND_IDENTIFIER,
+				(unsigned char*) EPIPHANY_FRONTEND_IDENTIFIER,
 				ephy_tab_get_visibility(tab), /* focused */
-				location, /* context */
+				(unsigned char*) location, /* context */
 				location, "url", 10,
 				page_title, "title", 10,
 				content, "htmlblock", 10,
@@ -157,9 +157,9 @@
 			LOG ("Page not bookmarked, sending only location and title")
 
 			DashboardSendCluePacket (
-				EPIPHANY_FRONTEND_IDENTIFIER,
+				(unsigned char*) EPIPHANY_FRONTEND_IDENTIFIER,
 				ephy_tab_get_visibility(tab), /* focused */
-				location, /* context */
+				(unsigned char*) location, /* context */
 				location, "url", 10,
 				page_title, "title", 10,
 				NULL);
diff -urN ../tmp-orig/epiphany-extensions-1.4.4/extensions/error-viewer/sgml-validator.c ./extensions/error-viewer/sgml-validator.c
--- ../tmp-orig/epiphany-extensions-1.4.4/extensions/error-viewer/sgml-validator.c	2004-10-11 19:27:11.000000000 +0200
+++ ./extensions/error-viewer/sgml-validator.c	2005-01-13 14:59:29.000000000 +0100
@@ -328,7 +328,7 @@
 {
 	const char *dest;
 	char *location;
-	char *dest_utf8;
+	char *dest_utf8 = 0;
 	gboolean is_xml;
 	unsigned int num_errors = 0;
 	OpenSPThreadCBData *data;
diff -urN ../tmp-orig/epiphany-extensions-1.4.4/extensions/gestures/ephy-gestures-extension.c ./extensions/gestures/ephy-gestures-extension.c
--- ../tmp-orig/epiphany-extensions-1.4.4/extensions/gestures/ephy-gestures-extension.c	2004-09-26 18:22:39.000000000 +0200
+++ ./extensions/gestures/ephy-gestures-extension.c	2005-01-13 15:15:13.107628353 +0100
@@ -116,13 +116,13 @@
 
 	for (child = node->children; child != NULL; child = child->next)
 	{
-		if (xmlStrEqual (child->name, "sequence"))
+		if (xmlStrEqual (child->name, (unsigned char*) "sequence"))
 		{
 			s = xmlNodeGetContent (child);
 
 			sequences = g_slist_prepend (sequences, s);
 		}
-		else if (xmlStrEqual (child->name, "action"))
+		else if (xmlStrEqual (child->name, (unsigned char*) "action"))
 		{
 			if (action == NULL)
 			{
@@ -145,7 +145,7 @@
 	{
 		g_hash_table_insert (extension->priv->gestures,
 				     g_strdup (l->data),
-				     g_strdup (action));
+				     g_strdup ((char*)action));
 		xmlFree (l->data);
 	}
 
@@ -175,7 +175,7 @@
 	}
 
 	root = xmlDocGetRootElement (doc);
-	if (root == NULL || strcmp (root->name, EPHY_GESTURES_XML_ROOT) != 0)
+	if (root == NULL || strcmp ((char*)root->name, EPHY_GESTURES_XML_ROOT) != 0)
 	{
 		g_warning ("Gestures definitions file %s has wrong format '%s'"
 		           "(expected " EPHY_GESTURES_XML_ROOT ")\n",
@@ -183,8 +183,8 @@
 		goto out;
 	}
 
-	tmp = xmlGetProp (root, "version");
-	if (tmp  == NULL || strcmp (tmp, EPHY_GESTURES_XML_VERSION) != 0)
+	tmp = xmlGetProp (root, (unsigned char*) "version");
+	if (tmp  == NULL || strcmp ((char*) tmp, (char*) EPHY_GESTURES_XML_VERSION) != 0)
 	{
 		g_warning ("Gestures definitions file %s has wrong format version %s"
 			   "(expected " EPHY_GESTURES_XML_VERSION ")\n",
@@ -194,7 +194,7 @@
 
 	for (child = root->children; child != NULL; child = child->next)
 	{
-		if (xmlStrEqual (child->name, "gesture"))
+		if (xmlStrEqual (child->name, (unsigned char*) "gesture"))
 		{
 			load_one_gesture (extension, child);
 		}
diff -urN ../tmp-orig/epiphany-extensions-1.4.4/extensions/sidebar/ephy-sidebar-embed.c ./extensions/sidebar/ephy-sidebar-embed.c
--- ../tmp-orig/epiphany-extensions-1.4.4/extensions/sidebar/ephy-sidebar-embed.c	2004-09-28 13:03:21.000000000 +0200
+++ ./extensions/sidebar/ephy-sidebar-embed.c	2005-01-13 15:14:05.929596122 +0100
@@ -144,7 +144,7 @@
 {
 	EphyEmbedEvent *event = (EphyEmbedEvent *) user_data;
 
-	ephy_embed_event_get_coords (event, x, y);
+	ephy_embed_event_get_coords (event, (guint*) x, (guint*) y);
 
 	*push_in = TRUE;
 }
diff -urN ../tmp-orig/epiphany-extensions-1.4.4/extensions/sidebar/ephy-sidebar-extension.c ./extensions/sidebar/ephy-sidebar-extension.c
--- ../tmp-orig/epiphany-extensions-1.4.4/extensions/sidebar/ephy-sidebar-extension.c	2004-09-28 12:58:37.000000000 +0200
+++ ./extensions/sidebar/ephy-sidebar-extension.c	2005-01-13 15:12:45.298159799 +0100
@@ -603,8 +603,8 @@
 
 	ephy_node_db_load_from_file (extension->priv->db,
 				     extension->priv->xml_file,
-				     EPHY_SIDEBARS_XML_ROOT,
-				     EPHY_SIDEBARS_XML_VERSION);
+				     (unsigned char*) EPHY_SIDEBARS_XML_ROOT,
+				     (unsigned char*) EPHY_SIDEBARS_XML_VERSION);
 	
 	if (ephy_node_get_n_children (extension->priv->state_parent))
 	{
@@ -634,9 +634,9 @@
 	
 	ephy_node_db_write_to_xml_safe
 		(extension->priv->db, 
-		 extension->priv->xml_file,
-		 EPHY_SIDEBARS_XML_ROOT,
-		 EPHY_SIDEBARS_XML_VERSION,
+		 (unsigned char*) extension->priv->xml_file,
+		 (unsigned char*) EPHY_SIDEBARS_XML_ROOT,
+		 (unsigned char*) EPHY_SIDEBARS_XML_VERSION,
 		 NULL,
 		 extension->priv->sidebars, 0, 
 		 extension->priv->state_parent, 0,