Mercurial > pidgin.yaz
changeset 7386:414c701ef1ff
[gaim-migrate @ 7981]
Code cleanup to get rid of all warnings for AMD64 from augustus at linuxhardware dot org
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Thu, 30 Oct 2003 22:27:36 +0000 |
parents | 79d74929693c |
children | 86933f4e7fb8 |
files | plugins/gaim-remote/remote.c plugins/gestures/gestures.c plugins/perl/perl-common.c plugins/perl/perl-handlers.c src/gtkconv.c src/gtkimhtml.c src/gtknotify.c src/protocols/gg/gg.c src/protocols/msn/dispatch.c src/protocols/msn/httpmethod.c src/protocols/msn/msg.c src/protocols/msn/msnslp.c src/protocols/msn/notification.c src/protocols/msn/page.c src/protocols/oscar/oscar.c src/util.c |
diffstat | 16 files changed, 39 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/gaim-remote/remote.c Thu Oct 30 21:55:29 2003 +0000 +++ b/plugins/gaim-remote/remote.c Thu Oct 30 22:27:36 2003 +0000 @@ -458,7 +458,7 @@ GError *error = NULL; while (total < len) { - if (g_io_channel_read_chars(source, buf + total, len - total, &cur, &error) != G_IO_STATUS_NORMAL) { + if (g_io_channel_read_chars(source, buf + total, len - total, (gsize *) &cur, &error) != G_IO_STATUS_NORMAL) { if (error) g_error_free(error); return -1;
--- a/plugins/gestures/gestures.c Thu Oct 30 21:55:29 2003 +0000 +++ b/plugins/gestures/gestures.c Thu Oct 30 22:27:36 2003 +0000 @@ -155,7 +155,7 @@ visual_pref_cb(const char *name, GaimPrefType type, gpointer value, gpointer data) { - gstroke_set_draw_strokes((gboolean)value); + gstroke_set_draw_strokes((gboolean) GPOINTER_TO_INT(value) ); } static gboolean
--- a/plugins/perl/perl-common.c Thu Oct 30 21:55:29 2003 +0000 +++ b/plugins/perl/perl-common.c Thu Oct 30 22:27:36 2003 +0000 @@ -499,19 +499,19 @@ return gaim_perl_sv_from_subtype(value, *copy_arg); case GAIM_TYPE_BOOLEAN: - *copy_arg = (void *)va_arg(*args, gboolean); + *copy_arg = GINT_TO_POINTER( va_arg(*args, gboolean) ); - return newSViv((gboolean)*copy_arg); + return newSViv((gboolean)GPOINTER_TO_INT(*copy_arg)); case GAIM_TYPE_INT: - *copy_arg = (void *)va_arg(*args, int); + *copy_arg = GINT_TO_POINTER( va_arg(*args, int) ); - return newSViv((int)*copy_arg); + return newSViv(GPOINTER_TO_INT(*copy_arg)); case GAIM_TYPE_UINT: - *copy_arg = (void *)va_arg(*args, unsigned int); + *copy_arg = GUINT_TO_POINTER(va_arg(*args, unsigned int)); - return newSVuv((unsigned int)*copy_arg); + return newSVuv(GPOINTER_TO_UINT(*copy_arg)); case GAIM_TYPE_LONG: *copy_arg = (void *)va_arg(*args, long);
--- a/plugins/perl/perl-handlers.c Thu Oct 30 21:55:29 2003 +0000 +++ b/plugins/perl/perl-handlers.c Thu Oct 30 22:27:36 2003 +0000 @@ -90,7 +90,7 @@ for (i = 0; i < value_count; i++) { sv_args[i] = sv_2mortal(gaim_perl_sv_from_vargs(values[i], - &args, ©_args[i])); + (va_list*)&args, ©_args[i])); XPUSHs(sv_args[i]); }
--- a/src/gtkconv.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/gtkconv.c Thu Oct 30 22:27:36 2003 +0000 @@ -2988,7 +2988,7 @@ static char * item_factory_translate_func (const char *path, gpointer func_data) { - return _(path); + return _((char *)path); } static GtkWidget * @@ -5919,7 +5919,7 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); - gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), (gboolean)value); + gtk_imhtml_show_comments(GTK_IMHTML(gtkconv->imhtml), (gboolean)GPOINTER_TO_INT(value)); } } @@ -5968,7 +5968,7 @@ gtkconv = GAIM_GTK_CONVERSATION(conv); - gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), (gboolean)value); + gtk_imhtml_show_smileys(GTK_IMHTML(gtkconv->imhtml), (gboolean)GPOINTER_TO_INT(value)); } } @@ -6016,7 +6016,7 @@ win = gaim_conversation_get_window(conv); gtkwin = GAIM_GTK_WINDOW(win); - gtkconv->show_formatting_toolbar = (gboolean)value; + gtkconv->show_formatting_toolbar = (gboolean)GPOINTER_TO_INT(value); gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(gtkwin->menu.show_formatting_toolbar), gtkconv->show_formatting_toolbar);
--- a/src/gtkimhtml.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/gtkimhtml.c Thu Oct 30 22:27:36 2003 +0000 @@ -95,7 +95,7 @@ t->children = g_realloc (t->children, t->values->len * sizeof (GtkSmileyTree *)); t->children [index] = g_new0 (GtkSmileyTree, 1); } else - index = (int) pos - GPOINTER_TO_INT(t->values->str); + index = GPOINTER_TO_INT(pos) - GPOINTER_TO_INT(t->values->str); t = t->children [index];
--- a/src/gtknotify.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/gtknotify.c Thu Oct 30 22:27:36 2003 +0000 @@ -206,8 +206,8 @@ /* Descriptive label */ detail_text = g_strdup_printf( - ngettext("%s has %d new message.", "%s has %d new messages.", count), - *tos, count); + ngettext("%s has %d new message.", "%s has %d new messages.", (int) count), + *tos, (int) count); if (count == 1) { char *from_text = NULL, *subject_text = NULL;
--- a/src/protocols/gg/gg.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/gg/gg.c Thu Oct 30 22:27:36 2003 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 7685 2003-10-02 02:54:07Z chipx86 $ + * $Id: gg.c 7981 2003-10-30 22:27:36Z lschiere $ * * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> * @@ -956,7 +956,7 @@ "User-Agent: " GG_HTTP_USERAGENT "\r\n" "Content-Length: %d\r\n" "Pragma: no-cache\r\n" "\r\n" "%s\r\n", - hdata->form, hdata->host, strlen(request), request); + hdata->form, hdata->host, (int)strlen(request), request); g_free(request);
--- a/src/protocols/msn/dispatch.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/msn/dispatch.c Thu Oct 30 22:27:36 2003 +0000 @@ -229,7 +229,7 @@ strcpy(old_buf, proto_vers); - g_snprintf(proto_vers, sizeof(proto_vers), "MSNP%d %s", i, old_buf); + g_snprintf(proto_vers, sizeof(proto_vers), "MSNP%d %s", (int)i, old_buf); } strncat(proto_vers, "CVR0", sizeof(proto_vers));
--- a/src/protocols/msn/httpmethod.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/msn/httpmethod.c Thu Oct 30 22:27:36 2003 +0000 @@ -146,7 +146,7 @@ servconn->http_data->gateway_ip, params, servconn->http_data->gateway_ip, - size, + (int)size, buf); g_free(params);
--- a/src/protocols/msn/msg.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/msn/msg.c Thu Oct 30 22:27:36 2003 +0000 @@ -378,12 +378,12 @@ g_snprintf(buf, sizeof(buf), "MSG %s %s %d\r\n", msn_user_get_passport(sender), msn_user_get_name(sender), - msg->size); + (int)msg->size); } else { g_snprintf(buf, sizeof(buf), "MSG %d %c %d\r\n", msn_message_get_transaction_id(msg), - msn_message_get_flag(msg), msg->size); + msn_message_get_flag(msg), (int)msg->size); } len = strlen(buf) + msg->size + 1;
--- a/src/protocols/msn/msnslp.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/msn/msnslp.c Thu Oct 30 22:27:36 2003 +0000 @@ -279,7 +279,7 @@ msn_user_get_passport(local_user), branch, slpsession->call_id, - strlen(content) + 5, + (int)strlen(content) + 5, content); g_free(content);
--- a/src/protocols/msn/notification.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/msn/notification.c Thu Oct 30 22:27:36 2003 +0000 @@ -2157,7 +2157,7 @@ strcpy(old_buf, proto_vers); - g_snprintf(proto_vers, sizeof(proto_vers), "MSNP%d %s", i, old_buf); + g_snprintf(proto_vers, sizeof(proto_vers), "MSNP%d %s", (int)i, old_buf); } strncat(proto_vers, "CVR0", sizeof(proto_vers));
--- a/src/protocols/msn/page.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/msn/page.c Thu Oct 30 22:27:36 2003 +0000 @@ -116,7 +116,7 @@ g_snprintf(buf, sizeof(buf), "PAG %d %s %d\r\n", msn_page_get_transaction_id(page), msn_user_get_passport(receiver), - page->size); + (int)page->size); } len = strlen(buf) + page->size + 1;
--- a/src/protocols/oscar/oscar.c Thu Oct 30 21:55:29 2003 +0000 +++ b/src/protocols/oscar/oscar.c Thu Oct 30 22:27:36 2003 +0000 @@ -3890,6 +3890,15 @@ return 1; } +/* This function was recommended by the STRFTIME(3) man page to remove the + * "last 2 digits" warning. + */ +static size_t my_strftime(char *s, size_t max, const char *fmt, + const struct tm *tm) +{ + return strftime(s, max, fmt, tm); +} + static int gaim_icqinfo(aim_session_t *sess, aim_frame_t *fr, ...) { GaimConnection *gc = sess->aux_data; @@ -3941,7 +3950,7 @@ tm.tm_mday = (int)info->birthday; tm.tm_mon = (int)info->birthmonth-1; tm.tm_year = (int)info->birthyear-1900; - strftime(date, sizeof(date), "%x", &tm); + my_strftime(date, sizeof(date), "%x", &tm); tmp = buf; buf = g_strconcat(tmp, "\n<br><b>", _("Birthday"), ":</b> ", date, NULL); g_free(tmp); } if (info->age) { @@ -5841,15 +5850,15 @@ if (image->filename) g_string_append_printf(msg, "<IMG SRC=\"file://%s\" ID=\"%d\" DATASIZE=\"%d\">", - image->filename, oscar_id, image->size); + image->filename, oscar_id, (int)image->size); else g_string_append_printf(msg, "<IMG ID=\"%d\" DATASIZE=\"%d\">", - oscar_id, image->size); + oscar_id, (int)image->size); /* ... and append the data to the binary section ... */ g_string_append_printf(data, "<DATA ID=\"%d\" SIZE=\"%d\">", - oscar_id, image->size); + oscar_id, (int)image->size); data = g_string_append_len(data, image->data, image->size); data = g_string_append(data, "</DATA>"); } else {