Mercurial > pidgin
changeset 6063:5239a3b4ab33
[gaim-migrate @ 6513]
clean up a lot of compiler warnings. Hopefully I didn't break anything too badly.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 08 Jul 2003 06:11:49 +0000 |
parents | 2cd7c409d71d |
children | ed3c3c38e182 |
files | plugins/autorecon.c plugins/docklet/docklet.c plugins/events.c plugins/filectl.c plugins/gaim-remote/remote-socket.c plugins/gaim-remote/remote.c plugins/gaiminc.c plugins/gestures/gestures.c plugins/gestures/stroke.c plugins/history.c plugins/iconaway.c plugins/idle.c plugins/mailchk.c plugins/notify.c plugins/perl/perl.c plugins/raw.c plugins/simple.c plugins/spellchk.c plugins/statenotify.c plugins/ticker/ticker.c plugins/timestamp.c plugins/win32/transparency/win2ktrans.c plugins/win32/winprefs/winprefs.c src/blist.h src/conversation.h src/event.h src/protocols/gg/libgg.c src/protocols/gg/libgg.h src/protocols/jabber/lib.h src/protocols/jabber/libxode.h src/protocols/jabber/socket.c src/proxy.h src/prpl.h |
diffstat | 33 files changed, 75 insertions(+), 70 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/autorecon.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/autorecon.c Tue Jul 08 06:11:49 2003 +0000 @@ -99,4 +99,4 @@ { } -GAIM_INIT_PLUGIN(autorecon, init_plugin, info); +GAIM_INIT_PLUGIN(autorecon, init_plugin, info)
--- a/plugins/docklet/docklet.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/docklet/docklet.c Tue Jul 08 06:11:49 2003 +0000 @@ -528,4 +528,4 @@ { } -GAIM_INIT_PLUGIN(docklet, init_plugin, info); +GAIM_INIT_PLUGIN(docklet, init_plugin, info)
--- a/plugins/events.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/events.c Tue Jul 08 06:11:49 2003 +0000 @@ -255,4 +255,4 @@ { } -GAIM_INIT_PLUGIN(eventtester, init_plugin, info); +GAIM_INIT_PLUGIN(eventtester, init_plugin, info)
--- a/plugins/filectl.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/filectl.c Tue Jul 08 06:11:49 2003 +0000 @@ -222,4 +222,4 @@ { } -GAIM_INIT_PLUGIN(filectl, init_plugin, info); +GAIM_INIT_PLUGIN(filectl, init_plugin, info)
--- a/plugins/gaim-remote/remote-socket.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/gaim-remote/remote-socket.c Tue Jul 08 06:11:49 2003 +0000 @@ -31,6 +31,8 @@ #include "internal.h" #include <sys/un.h> #include <gaim-remote/remote.h> +#include <sys/types.h> +#include <unistd.h> void gaim_remote_session_send_packet(int fd, GaimRemotePacket *p)
--- a/plugins/gaim-remote/remote.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/gaim-remote/remote.c Tue Jul 08 06:11:49 2003 +0000 @@ -295,7 +295,7 @@ #ifndef _WIN32 static void -meta_handler(struct UI *ui, guchar subtype, guchar *data) +meta_handler(struct UI *ui, guchar subtype, gchar *data) { GaimRemotePacket *p; GError *error = NULL; @@ -335,7 +335,7 @@ } static void -plugin_handler(struct UI *ui, guchar subtype, guchar *data) +plugin_handler(struct UI *ui, guchar subtype, gpointer data) { #ifdef GAIM_PLUGINS guint id; @@ -365,7 +365,7 @@ } static void -user_handler(struct UI *ui, guchar subtype, guchar *data) +user_handler(struct UI *ui, guchar subtype, gchar *data) { guint id; GaimAccount *account; @@ -398,7 +398,7 @@ } static void -message_handler(struct UI *ui, guchar subtype, guchar *data) +message_handler(struct UI *ui, guchar subtype, gchar *data) { switch (subtype) { case CUI_MESSAGE_LIST: @@ -447,10 +447,10 @@ } static gint -gaim_recv(GIOChannel *source, guchar *buf, gint len) +gaim_recv(GIOChannel *source, gchar *buf, gint len) { gint total = 0; - gint cur; + guint cur; GError *error = NULL; @@ -469,7 +469,7 @@ } static void -remote_handler(struct UI *ui, guchar subtype, guchar *data, int len) +remote_handler(struct UI *ui, guchar subtype, gchar *data, int len) { const char *resp; char *send; @@ -496,13 +496,13 @@ { struct UI *ui = data; - guchar type; - guchar subtype; + gchar type; + gchar subtype; guint32 len; GError *error = NULL; - guchar *in; + gchar *in; /* no byte order worries! this'll change if we go to TCP */ if (gaim_recv(source, &type, sizeof(type)) != sizeof(type)) { @@ -531,7 +531,7 @@ return FALSE; } - if (gaim_recv(source, (guchar *)&len, sizeof(len)) != sizeof(len)) { + if (gaim_recv(source, (gchar *)&len, sizeof(len)) != sizeof(len)) { gaim_debug(GAIM_DEBUG_ERROR, "cui", "UI has abandoned us!\n"); uis = g_slist_remove(uis, ui); g_io_channel_shutdown(ui->channel, TRUE, &error); @@ -545,7 +545,7 @@ } if (len) { - in = g_new0(guchar, len); + in = g_new0(gchar, len); if (gaim_recv(source, in, len) != len) { gaim_debug(GAIM_DEBUG_ERROR, "cui", "UI has abandoned us!\n"); uis = g_slist_remove(uis, ui); @@ -605,7 +605,7 @@ socket_readable(GIOChannel *source, GIOCondition cond, gpointer data) { struct sockaddr_un saddr; - gint len = sizeof(saddr); + guint len = sizeof(saddr); gint fd; struct UI *ui; @@ -695,7 +695,7 @@ #ifndef _WIN32 char buf[1024]; close(UI_fd); - snprintf(buf, 1024, "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", + g_snprintf(buf, sizeof(buf), "%s" G_DIR_SEPARATOR_S "gaim_%s.%d", g_get_tmp_dir(), g_get_user_name(), gaim_session); unlink(buf); @@ -753,4 +753,4 @@ { } -GAIM_INIT_PLUGIN(remote, __init_plugin, info); +GAIM_INIT_PLUGIN(remote, __init_plugin, info)
--- a/plugins/gaiminc.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/gaiminc.c Tue Jul 08 06:11:49 2003 +0000 @@ -95,4 +95,4 @@ { } -GAIM_INIT_PLUGIN(gaiminc, init_plugin, info); +GAIM_INIT_PLUGIN(gaiminc, init_plugin, info)
--- a/plugins/gestures/gestures.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/gestures/gestures.c Tue Jul 08 06:11:49 2003 +0000 @@ -305,4 +305,4 @@ visual_pref_cb, NULL); } -GAIM_INIT_PLUGIN(gestures, init_plugin, info); +GAIM_INIT_PLUGIN(gestures, init_plugin, info)
--- a/plugins/gestures/stroke.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/gestures/stroke.c Tue Jul 08 06:11:49 2003 +0000 @@ -131,9 +131,11 @@ if ((bin_count > (metrics->point_count * GSTROKE_BIN_COUNT_PERCENT)) || (first_bin == TRUE)) { - //gchar val = '0' + prev_bin; - //printf ("%c", val);fflush (stdout); - //g_string_append (&sequence, &val); + /* + gchar val = '0' + prev_bin; + printf ("%c", val);fflush (stdout); + g_string_append (&sequence, &val); + */ first_bin = FALSE; sequence[sequence_count++] = '0' + prev_bin; @@ -158,10 +160,11 @@ _gstroke_init (metrics); { - // FIXME: get rid of this block - //gchar val = '0' + current_bin; - //printf ("%c\n", val);fflush (stdout); - //g_string_append (&sequence, '\0'); + /* FIXME: get rid of this block + gchar val = '0' + current_bin; + printf ("%c\n", val);fflush (stdout); + g_string_append (&sequence, '\0'); + */ sequence[sequence_count] = '\0'; }
--- a/plugins/history.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/history.c Tue Jul 08 06:11:49 2003 +0000 @@ -102,4 +102,4 @@ { } -GAIM_INIT_PLUGIN(history, init_plugin, info); +GAIM_INIT_PLUGIN(history, init_plugin, info)
--- a/plugins/iconaway.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/iconaway.c Tue Jul 08 06:11:49 2003 +0000 @@ -93,4 +93,4 @@ { } -GAIM_INIT_PLUGIN(iconaway, init_plugin, info); +GAIM_INIT_PLUGIN(iconaway, init_plugin, info)
--- a/plugins/idle.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/idle.c Tue Jul 08 06:11:49 2003 +0000 @@ -134,4 +134,4 @@ { } -GAIM_INIT_PLUGIN(idle, init_plugin, info); +GAIM_INIT_PLUGIN(idle, init_plugin, info)
--- a/plugins/mailchk.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/mailchk.c Tue Jul 08 06:11:49 2003 +0000 @@ -168,4 +168,4 @@ { } -GAIM_INIT_PLUGIN(mailchk, init_plugin, info); +GAIM_INIT_PLUGIN(mailchk, init_plugin, info)
--- a/plugins/notify.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/notify.c Tue Jul 08 06:11:49 2003 +0000 @@ -719,4 +719,4 @@ my_plugin = plugin; } -GAIM_INIT_PLUGIN(notify, init_plugin, info); +GAIM_INIT_PLUGIN(notify, init_plugin, info)
--- a/plugins/perl/perl.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/perl/perl.c Tue Jul 08 06:11:49 2003 +0000 @@ -1411,4 +1411,4 @@ loader_info.exts = g_list_append(loader_info.exts, "pl"); } -GAIM_INIT_PLUGIN(perl, init_plugin, info); +GAIM_INIT_PLUGIN(perl, init_plugin, info)
--- a/plugins/raw.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/raw.c Tue Jul 08 06:11:49 2003 +0000 @@ -169,4 +169,4 @@ me = plugin; } -GAIM_INIT_PLUGIN(raw, init_plugin, info); +GAIM_INIT_PLUGIN(raw, init_plugin, info)
--- a/plugins/simple.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/simple.c Tue Jul 08 06:11:49 2003 +0000 @@ -49,4 +49,4 @@ { } -GAIM_INIT_PLUGIN(simple, init_plugin, info); +GAIM_INIT_PLUGIN(simple, init_plugin, info)
--- a/plugins/spellchk.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/spellchk.c Tue Jul 08 06:11:49 2003 +0000 @@ -541,4 +541,4 @@ { } -GAIM_INIT_PLUGIN(spellcheck, init_plugin, info); +GAIM_INIT_PLUGIN(spellcheck, init_plugin, info)
--- a/plugins/statenotify.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/statenotify.c Tue Jul 08 06:11:49 2003 +0000 @@ -93,4 +93,4 @@ { } -GAIM_INIT_PLUGIN(statenotify, init_plugin, info); +GAIM_INIT_PLUGIN(statenotify, init_plugin, info)
--- a/plugins/ticker/ticker.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/ticker/ticker.c Tue Jul 08 06:11:49 2003 +0000 @@ -299,4 +299,4 @@ { } -GAIM_INIT_PLUGIN(ticker, init_plugin, info); +GAIM_INIT_PLUGIN(ticker, init_plugin, info)
--- a/plugins/timestamp.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/timestamp.c Tue Jul 08 06:11:49 2003 +0000 @@ -167,4 +167,4 @@ { } -GAIM_INIT_PLUGIN(timestamp, init_plugin, info); +GAIM_INIT_PLUGIN(timestamp, init_plugin, info)
--- a/plugins/win32/transparency/win2ktrans.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/win32/transparency/win2ktrans.c Tue Jul 08 06:11:49 2003 +0000 @@ -463,4 +463,4 @@ gaim_prefs_add_bool("/plugins/gtk/win32/wintrans/bl_on_top", FALSE); } -GAIM_INIT_PLUGIN(wintrans, init_plugin, info); +GAIM_INIT_PLUGIN(wintrans, init_plugin, info)
--- a/plugins/win32/winprefs/winprefs.c Tue Jul 08 04:23:24 2003 +0000 +++ b/plugins/win32/winprefs/winprefs.c Tue Jul 08 06:11:49 2003 +0000 @@ -170,4 +170,4 @@ gaim_prefs_add_bool("/plugins/gtk/win32/winprefs/auto_start", FALSE); } -GAIM_INIT_PLUGIN(winprefs, init_plugin, info); +GAIM_INIT_PLUGIN(winprefs, init_plugin, info)
--- a/src/blist.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/blist.h Tue Jul 08 06:11:49 2003 +0000 @@ -43,7 +43,7 @@ GAIM_BLIST_GROUP_NODE, GAIM_BLIST_BUDDY_NODE, GAIM_BLIST_CHAT_NODE, - GAIM_BLIST_OTHER_NODE, + GAIM_BLIST_OTHER_NODE }; #define GAIM_BLIST_NODE_IS_CHAT(n) ((n)->type == GAIM_BLIST_CHAT_NODE) @@ -54,7 +54,7 @@ GAIM_BUDDY_SIGNING_OFF = -1, GAIM_BUDDY_OFFLINE = 0, GAIM_BUDDY_ONLINE, - GAIM_BUDDY_SIGNING_ON, + GAIM_BUDDY_SIGNING_ON }; #define GAIM_BUDDY_IS_ONLINE(b) ((b)->present == GAIM_BUDDY_ONLINE || \
--- a/src/conversation.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/conversation.h Tue Jul 08 06:11:49 2003 +0000 @@ -54,7 +54,7 @@ { GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ - GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ + GAIM_UNSEEN_NICK /**< Unseen text and the nick was said. */ } GaimUnseenState;
--- a/src/event.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/event.h Tue Jul 08 06:11:49 2003 +0000 @@ -5,7 +5,7 @@ * gaim * * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -62,7 +62,7 @@ event_got_typing, event_del_conversation, event_connecting, - event_conversation_switch, + event_conversation_switch /* any others? it's easy to add... */ } GaimEvent;
--- a/src/protocols/gg/libgg.c Tue Jul 08 04:23:24 2003 +0000 +++ b/src/protocols/gg/libgg.c Tue Jul 08 06:11:49 2003 +0000 @@ -1,4 +1,4 @@ -/* $Id: libgg.c 6304 2003-06-14 23:21:02Z chipx86 $ */ +/* $Id: libgg.c 6513 2003-07-08 06:11:49Z faceprint $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl>, @@ -73,7 +73,7 @@ #ifdef __GNUC__ __attribute__ ((unused)) #endif -= "$Id: libgg.c 6304 2003-06-14 23:21:02Z chipx86 $"; += "$Id: libgg.c 6513 2003-07-08 06:11:49Z faceprint $"; #endif @@ -253,7 +253,7 @@ return NULL; } if (errno != EINTR) { -// errno = EINVAL; + /* errno = EINVAL; */ free(buf); return NULL; } @@ -529,7 +529,7 @@ * * w przypadku błędu zwraca -1, inaczej numer sekwencyjny. */ -int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, unsigned char *message) +int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, char *message) { struct gg_send_msg s; @@ -750,7 +750,7 @@ return -1; } - p = (void*) h + sizeof(struct gg_header); + p = h + sizeof(struct gg_header); if (h->type == GG_RECV_MSG) { struct gg_recv_msg *r = p; @@ -926,7 +926,7 @@ case GG_STATE_CONNECTING: { char buf[1024]; - int res, res_size = sizeof(res); + unsigned int res, res_size = sizeof(res); gg_debug(GG_DEBUG_MISC, "== GG_STATE_CONNECTING\n"); @@ -1074,7 +1074,7 @@ case GG_STATE_CONNECTING_GG: { - int res, res_size = sizeof(res); + unsigned int res, res_size = sizeof(res); gg_debug(GG_DEBUG_MISC, "== GG_STATE_CONNECTING_GG\n"); @@ -1131,7 +1131,7 @@ break; } - w = (void*) h + sizeof(struct gg_header); + w = (struct gg_welcome *)(h + sizeof(struct gg_header)); w->key = fix32(w->key); for (hash = 1; *password; password++)
--- a/src/protocols/gg/libgg.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/protocols/gg/libgg.h Tue Jul 08 06:11:49 2003 +0000 @@ -1,4 +1,4 @@ -/* $Id: libgg.h 3516 2002-08-29 01:47:15Z seanegan $ */ +/* $Id: libgg.h 6513 2003-07-08 06:11:49Z faceprint $ */ /* * (C) Copyright 2001 Wojtek Kaniewski <wojtekka@irc.pl>, @@ -107,7 +107,7 @@ GG_SESSION_GG = 1, /* połączenie z serwerem gg */ GG_SESSION_HTTP, /* ogólna sesja http */ GG_SESSION_SEARCH, /* szukanie */ - GG_SESSION_REGISTER, /* rejestrowanie */ + GG_SESSION_REGISTER /* rejestrowanie */ }; /* @@ -130,7 +130,7 @@ /* gg_http */ GG_STATE_READING_HEADER, /* czeka na nagłówek http */ GG_STATE_PARSING, /* przetwarza dane */ - GG_STATE_DONE, /* skończył */ + GG_STATE_DONE /* skończył */ }; /* @@ -147,14 +147,14 @@ enum { GG_CHECK_NONE = 0, /* nic. nie powinno wystąpić */ GG_CHECK_WRITE = 1, /* sprawdzamy możliwość zapisu */ - GG_CHECK_READ = 2, /* sprawdzamy możliwość odczytu */ + GG_CHECK_READ = 2 /* sprawdzamy możliwość odczytu */ }; struct gg_session *gg_login(uin_t uin, char *password, int async); void gg_free_session(struct gg_session *sess); void gg_logoff(struct gg_session *sess); int gg_change_status(struct gg_session *sess, int status); -int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, unsigned char *message); +int gg_send_message(struct gg_session *sess, int msgclass, uin_t recipient, char *message); int gg_ping(struct gg_session *sess); struct gg_notify_reply { @@ -186,7 +186,7 @@ GG_EVENT_STATUS, GG_EVENT_ACK, GG_EVENT_CONN_FAILED, - GG_EVENT_CONN_SUCCESS, + GG_EVENT_CONN_SUCCESS }; /* @@ -199,7 +199,7 @@ GG_FAILURE_READING, GG_FAILURE_WRITING, GG_FAILURE_PASSWORD, - GG_FAILURE_404, + GG_FAILURE_404 }; /* @@ -212,7 +212,7 @@ GG_ERROR_RESOLVING = 1, GG_ERROR_CONNECTING, GG_ERROR_READING, - GG_ERROR_WRITING, + GG_ERROR_WRITING }; /*
--- a/src/protocols/jabber/lib.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/protocols/jabber/lib.h Tue Jul 08 06:11:49 2003 +0000 @@ -161,7 +161,7 @@ #define NETSOCKET_CLIENT 1 #define NETSOCKET_UDP 2 -int make_netsocket(u_short port, char *host, int type); +int make_netsocket(unsigned short port, char *host, int type); struct in_addr *make_addr(char *host); int set_fd_close_on_exec(int fd, int flag); @@ -557,8 +557,8 @@ int jlimit_check(jlimit r, char *key, int points); -// #define KARMA_DEBUG -// default to disable karma +/* #define KARMA_DEBUG */ +/* default to disable karma */ #define KARMA_READ_MAX(k) (abs(k)*100) /* how much you are allowed to read off the sock */ #define KARMA_INIT 5 /* internal "init" value */ #define KARMA_HEARTBEAT 2 /* seconds to register for heartbeat */
--- a/src/protocols/jabber/libxode.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/protocols/jabber/libxode.h Tue Jul 08 06:11:49 2003 +0000 @@ -157,7 +157,7 @@ #define NETSOCKET_CLIENT 1 #define NETSOCKET_UDP 2 -int make_netsocket(u_short port, char *host, int type); +int make_netsocket(unsigned short port, char *host, int type); struct in_addr *make_addr(char *host); int set_fd_close_on_exec(int fd, int flag);
--- a/src/protocols/jabber/socket.c Tue Jul 08 04:23:24 2003 +0000 +++ b/src/protocols/jabber/socket.c Tue Jul 08 06:11:49 2003 +0000 @@ -53,7 +53,7 @@ * type = NETSOCKET_UDP is a UDP connection socket */ -int make_netsocket(u_short port, char *host, int type) +int make_netsocket(unsigned short port, char *host, int type) { int s, flag = 1; struct sockaddr_in sa;
--- a/src/proxy.h Tue Jul 08 04:23:24 2003 +0000 +++ b/src/proxy.h Tue Jul 08 06:11:49 2003 +0000 @@ -35,7 +35,7 @@ GAIM_PROXY_NONE = 0, /**< No proxy. */ GAIM_PROXY_HTTP, /**< HTTP proxy. */ GAIM_PROXY_SOCKS4, /**< SOCKS 4 proxy. */ - GAIM_PROXY_SOCKS5, /**< SOCKS 5 proxy. */ + GAIM_PROXY_SOCKS5 /**< SOCKS 5 proxy. */ } GaimProxyType;