From 7deb194171233af0fd3689cc1cd2f9b772d883d0 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 23 Sep 2011 09:41:22 +0200 Subject: Fix warnings --- src/cmumble.c | 7 ++++--- src/io.c | 5 +++++ src/messages.c | 12 ++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/cmumble.c b/src/cmumble.c index 5c42521..31a5747 100644 --- a/src/cmumble.c +++ b/src/cmumble.c @@ -4,6 +4,7 @@ #include "varint.h" #include "cmumble.h" +#include "io.h" static struct user * find_user(struct context *ctx, uint32_t session) @@ -130,9 +131,9 @@ recv_server_sync(MumbleProto__ServerSync *sync, struct context *ctx) static void recv_crypt_setup(MumbleProto__CryptSetup *crypt, struct context *ctx) { +#if 0 int i; -#if 0 if (crypt->has_key) { g_print("key: 0x"); for (i = 0; i < crypt->key.len; ++i) @@ -261,7 +262,7 @@ read_cb(GObject *pollable_stream, gpointer data) return TRUE; } -void +static void set_pulse_states(gpointer data, gpointer user_data) { GstElement *elm = data; @@ -298,7 +299,7 @@ out: static int user_create_playback_pipeline(struct context *ctx, struct user *user) { - GstElement *pipeline, *sink_bin, *sink; + GstElement *pipeline, *sink_bin; GError *error = NULL; char *desc = "appsrc name=src ! celtdec ! audioconvert ! autoaudiosink name=sink"; diff --git a/src/io.c b/src/io.c index 906cc88..8d01a8e 100644 --- a/src/io.c +++ b/src/io.c @@ -29,6 +29,8 @@ read_cb(GIOChannel *source, GIOCondition condition, gpointer data) rl_callback_read_char(); global_rl_user_data = NULL; } + + return TRUE; } static void @@ -117,6 +119,8 @@ cmumble_io_init(struct context *ctx) rl_callback_handler_install("cmumble> ", process_line); g_set_print_handler(print_preserve_prompt); + + return 0; } int @@ -130,4 +134,5 @@ cmumble_io_fini(struct context *ctx) return -1; } + return 0; } diff --git a/src/messages.c b/src/messages.c index cdc0c98..899ac14 100644 --- a/src/messages.c +++ b/src/messages.c @@ -96,12 +96,12 @@ recv_msg(struct context *ctx, const struct mumble_callbacks *cbs) if (!(type >= 0 && type < G_N_ELEMENTS(messages))) { printf("unknown message type: %d\n", type); - return; + return 0; } if (len <= 0) { g_printerr("length 0\n"); - return; + return 0; } data = g_malloc(len); @@ -118,20 +118,20 @@ recv_msg(struct context *ctx, const struct mumble_callbacks *cbs) mumble_proto__udptunnel__init(&udptunnel); udptunnel.packet.len = len; - udptunnel.packet.data = data; + udptunnel.packet.data = (uint8_t *) data; if (callbacks[UDPTunnel]) callbacks[UDPTunnel](&udptunnel.base, ctx); g_free(data); - return; + return 0; } msg = protobuf_c_message_unpack(messages[type].descriptor, NULL, - len, data); + len, (uint8_t *) data); if (msg == NULL) { g_printerr("message unpack failure\n"); - return; + return 0; } g_print("debug: received message: %s type:%d, len:%d\n", messages[type].name, type, len); -- cgit