static void client_connected (void);
/* some other useful functions */
-static gboolean
-io_channel_cb (GIOChannel *source, GIOCondition condition, gpointer data);
+static gboolean io_channel_cb (GIOChannel *source, GIOCondition condition);
static int client_sendmsg (char *str);
static int client_readmsg (gchar **str);
static void server_ip (unsigned char buf[4]);
io_channel = g_io_channel_unix_new (sock);
g_io_channel_set_encoding (io_channel, NULL, NULL);
g_io_channel_set_buffered (io_channel, FALSE);
- source = g_io_add_watch (io_channel, G_IO_IN, io_channel_cb, NULL);
+ source = g_io_add_watch (io_channel, G_IO_IN, (GIOFunc)io_channel_cb, NULL);
/* say hello to the server */
{
/* some other useful functions */
static gboolean
-io_channel_cb (GIOChannel *source, GIOCondition condition, gpointer data)
+io_channel_cb (GIOChannel *source, GIOCondition condition)
{
gchar *buf;
- gint i = 0;
+
+ source = source; /* get rid of the warnings */
switch (condition)
{
gint bytes = 0;
gchar buf[1024];
GError *error = NULL;
- GIOStatus status;
gint i = 0;
do