Mercurial > pidgin
changeset 6478:338147ea6896
[gaim-migrate @ 6991]
Some compiler warning fixes for 64-bit platforms from Robot101.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 15 Aug 2003 22:16:44 +0000 |
parents | a224dc78d10a |
children | b808f9734879 |
files | src/browser.c src/conversation.c src/gtkdebug.c src/gtkimhtml.c src/gtkprefs.c src/protocols/jabber/jabber.c src/protocols/msn/buddyicon.c src/protocols/oscar/oscar.c src/server.c src/themes.c src/util.c |
diffstat | 11 files changed, 28 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/browser.c Fri Aug 15 22:16:44 2003 +0000 @@ -367,7 +367,7 @@ gaim_debug(GAIM_DEBUG_MISC, "browser", "%s: deleting " MOZILLA_LOCK_PROP " \"%s\" from 0x%x\n", - progname, lock_data, (unsigned int)window); + progname, lock_data, window); result = gdk_property_get(window, GDKA_MOZILLA_LOCK, gdk_x11_xatom_to_atom (XA_STRING), @@ -382,7 +382,7 @@ } else if (!data || !*data) { gaim_debug(GAIM_DEBUG_ERROR, "browser", "%s: Invalid data on " MOZILLA_LOCK_PROP - " of wnidow 0x%x\n", progname, (unsigned int)window); + " of window 0x%x\n", progname, window); return; } else if (strcmp((char *)data, lock_data)) { gaim_debug(GAIM_DEBUG_ERROR, "browser", @@ -476,7 +476,7 @@ gaim_debug(GAIM_DEBUG_MISC, "browser", "%s: Writing " MOZILLA_COMMAND_PROP " \"%s\" to 0x%x\n", - progname, command, (unsigned int)window); + progname, command, window); gdk_property_change(window, GDKA_MOZILLA_COMMAND, gdk_x11_xatom_to_atom (XA_STRING),
--- a/src/conversation.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/conversation.c Fri Aug 15 22:16:44 2003 +0000 @@ -231,7 +231,7 @@ gc, (type == GAIM_CONV_IM ? gaim_conversation_get_name(conv) - : (void *)gaim_chat_get_id(GAIM_CHAT(conv))), + : GINT_TO_POINTER(gaim_chat_get_id(GAIM_CHAT(conv)))), &buffy); if (buffy == NULL) {
--- a/src/gtkdebug.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/gtkdebug.c Fri Aug 15 22:16:44 2003 +0000 @@ -105,7 +105,7 @@ timestamps_pref_cb(const char *name, GaimPrefType type, gpointer value, gpointer data) { - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), (gboolean)value); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data), GPOINTER_TO_INT(value)); } static DebugWindow *
--- a/src/gtkimhtml.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/gtkimhtml.c Fri Aug 15 22:16:44 2003 +0000 @@ -94,7 +94,7 @@ t->children = g_realloc (t->children, t->values->len * sizeof (GtkSmileyTree *)); t->children [index] = g_new0 (GtkSmileyTree, 1); } else - index = (int) pos - (int) t->values->str; + index = (int) pos - GPOINTER_TO_INT(t->values->str); t = t->children [index]; @@ -600,7 +600,7 @@ pos = strchr (t->values->str, *x); if (pos) - t = t->children [(int) pos - (int) t->values->str]; + t = t->children [(int) pos - GPOINTER_TO_INT(t->values->str)]; else break; @@ -685,7 +685,7 @@ pos = strchr (t->values->str, *x); if (pos) { - t = t->children [(int) pos - (int) t->values->str]; + t = t->children [(int) pos - GPOINTER_TO_INT(t->values->str)]; } else { return sml ? gtk_smiley_tree_image(imhtml, NULL, text) : NULL; }
--- a/src/gtkprefs.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/gtkprefs.c Fri Aug 15 22:16:44 2003 +0000 @@ -1948,12 +1948,14 @@ gtk_widget_destroy(dest); } -void do_select_sound(GtkWidget *w, int snd) +void do_select_sound(GtkWidget *w, gpointer data) { const char *file; char *pref; + int snd; file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(sounddialog)); + snd = GPOINTER_TO_INT(data); /* If they type in a directory, change there */ if (gaim_gtk_check_if_dir(file, GTK_FILE_SELECTION(sounddialog))) @@ -1994,7 +1996,7 @@ g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->ok_button), "clicked", - G_CALLBACK(do_select_sound), (int *)sound_row_sel); + G_CALLBACK(do_select_sound), GINT_TO_POINTER(sound_row_sel)); g_signal_connect(G_OBJECT(GTK_FILE_SELECTION(sounddialog)->cancel_button), "clicked", @@ -2543,7 +2545,7 @@ a = (struct away_message *)awy->data; opt = gtk_menu_item_new_with_label(a->name); g_signal_connect(G_OBJECT(opt), "activate", - G_CALLBACK(set_default_away), (gpointer)index); + G_CALLBACK(set_default_away), GINT_TO_POINTER(index)); gtk_widget_show(opt); gtk_menu_shell_append(GTK_MENU_SHELL(menu), opt); @@ -2577,7 +2579,7 @@ { char buf[14]; - if ((int)d == 1) { + if (GPOINTER_TO_INT(d) == 1) { GdkColor fgcolor; gtk_color_selection_get_current_color(GTK_COLOR_SELECTION @@ -2609,17 +2611,18 @@ gaim_conversation_foreach(gaim_gtkconv_update_font_colors); } -void set_default_away(GtkWidget *w, gpointer i) +void set_default_away(GtkWidget *w, gpointer data) { struct away_message *default_away = NULL; int length = g_slist_length(away_messages); + int i = GPOINTER_TO_INT(data); if (away_messages == NULL) default_away = NULL; - else if ((int)i >= length) + else if (i >= length) default_away = g_slist_nth_data(away_messages, length - 1); else - default_away = g_slist_nth_data(away_messages, (int)i); + default_away = g_slist_nth_data(away_messages, i); if(default_away) gaim_prefs_set_string("/core/away/default_message", default_away->name);
--- a/src/protocols/jabber/jabber.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/protocols/jabber/jabber.c Fri Aug 15 22:16:44 2003 +0000 @@ -2827,7 +2827,7 @@ */ static void set_invisible_to_buddy_status(gpointer key, gpointer val, gpointer data) { struct jabber_buddy_data *jbd = val; - gboolean invisible = (gboolean) data; + gboolean invisible = GPOINTER_TO_INT(data); if(jbd) { if(invisible) { @@ -2854,7 +2854,7 @@ struct jabber_data *jd = gc->proto_data; if(jd->buddies != NULL) - g_hash_table_foreach(jd->buddies, set_invisible_to_buddy_status, (gpointer) invisible); + g_hash_table_foreach(jd->buddies, set_invisible_to_buddy_status, GINT_TO_POINTER(invisible)); } static const char *jabber_list_icon(GaimAccount *a, struct buddy *b)
--- a/src/protocols/msn/buddyicon.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/protocols/msn/buddyicon.c Fri Aug 15 22:16:44 2003 +0000 @@ -72,7 +72,7 @@ static gboolean get_buddy_icon_info(GaimAccount *account, char **base64, - char **md5sum, int *file_size, int *base64_size) + char **md5sum, size_t *file_size, size_t *base64_size) { FILE *fp; struct stat sb;
--- a/src/protocols/oscar/oscar.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/protocols/oscar/oscar.c Fri Aug 15 22:16:44 2003 +0000 @@ -2160,7 +2160,7 @@ struct oscar_data *od = gc->proto_data; char *tmp; int flags = 0; - int convlen; + gsize convlen; GError *err = NULL; struct buddyinfo *bi; const char *iconfile; @@ -4278,7 +4278,7 @@ struct buddyinfo *bi; struct aim_sendimext_args args; struct stat st; - int len; + gsize len; bi = g_hash_table_lookup(od->buddyinfo, normalize(name)); if (!bi) { @@ -4443,7 +4443,7 @@ fu32_t flags = 0; char *text_html = NULL; char *msg = NULL; - int msglen = 0; + gsize msglen = 0; if (od->rights.maxsiglen == 0) gaim_notify_warning(gc, NULL, _("Unable to set AIM profile."), @@ -4498,7 +4498,7 @@ fu32_t flags = 0; gchar *text_html = NULL; char *msg = NULL; - int msglen = 0; + gsize msglen = 0; if (od->rights.maxawaymsglen == 0) gaim_notify_warning(gc, NULL, _("Unable to set AIM away message."),
--- a/src/server.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/server.c Fri Aug 15 22:16:44 2003 +0000 @@ -615,7 +615,7 @@ if (g != NULL && g->prpl != NULL) prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(g->prpl); - gaim_event_broadcast(event_chat_send_invite, g, (void *)id, name, &buffy); + gaim_event_broadcast(event_chat_send_invite, g, id, name, &buffy); if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->chat_invite) prpl_info->chat_invite(g, id, buffy, name);
--- a/src/themes.c Fri Aug 15 17:57:12 2003 +0000 +++ b/src/themes.c Fri Aug 15 22:16:44 2003 +0000 @@ -130,7 +130,7 @@ if (*i == '[' && strchr(i, ']') && load) { struct smiley_list *child = g_new0(struct smiley_list, 1); - child->sml = g_strndup(i+1, (int)strchr(i, ']') - (int)i - 1); + child->sml = g_strndup(i+1, strchr(i, ']') - i - 1); if (theme->list) list->next = child; else