diff src/gtkimhtml.c @ 11143:5c56223fa24f

[gaim-migrate @ 13207] I think this gets rid of the last of the gcc4 -Wall warnings in the core committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 22 Jul 2005 02:06:15 +0000
parents 65db26d0bc90
children 409d6a11da51
line wrap: on
line diff
--- a/src/gtkimhtml.c	Fri Jul 22 01:49:19 2005 +0000
+++ b/src/gtkimhtml.c	Fri Jul 22 02:06:15 2005 +0000
@@ -828,7 +828,7 @@
 		str = g_string_append(str, text);
 		str = g_string_append_unichar(str, 0x0000);
 		selection = g_convert(str->str, str->len, "UCS-2", "UTF-8", NULL, &len, NULL);
-		gtk_selection_data_set(selection_data, gdk_atom_intern("text/html", FALSE), 16, selection, len);
+		gtk_selection_data_set(selection_data, gdk_atom_intern("text/html", FALSE), 16, (const guchar *)selection, len);
 		g_string_free(str, TRUE);
 		g_free(selection);
 	} else {
@@ -1546,11 +1546,11 @@
 
 static void
 gtk_imhtml_link_drag_rcv_cb(GtkWidget *widget, GdkDragContext *dc, guint x, guint y,
- 			    GtkSelectionData *sd, guint info, guint t, GtkIMHtml *imhtml)
+			    GtkSelectionData *sd, guint info, guint t, GtkIMHtml *imhtml)
 {
 	gchar **links;
 	gchar *link;
-	char *text = sd->data;
+	char *text = (char *)sd->data;
 	GtkTextMark *mark = gtk_text_buffer_get_insert(imhtml->text_buffer);
 	GtkTextIter iter;
 	gint i = 0;
@@ -1560,9 +1560,10 @@
 	if(gtk_imhtml_get_editable(imhtml) && sd->data){
 		switch (info) {
 		case GTK_IMHTML_DRAG_URL:
-			gaim_str_strip_cr(sd->data);
-
-			links = g_strsplit(sd->data, "\n", 0);
+			/* TODO: Is it really ok to change sd->data...? */
+			gaim_str_strip_cr((char *)sd->data);
+
+			links = g_strsplit((char *)sd->data, "\n", 0);
 			while((link = links[i]) != NULL){
 				if(gaim_str_has_prefix(link, "http://") ||
 				   gaim_str_has_prefix(link, "https://") ||