diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-23 09:41:22 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-09-23 09:58:11 +0200 |
commit | 7deb194171233af0fd3689cc1cd2f9b772d883d0 (patch) | |
tree | 18ad4879908cdbfe2aef2c332aa91182ff78555f /src | |
parent | 178fc8a562cded476ed2872df47e17e001380da6 (diff) | |
download | cmumble-7deb194171233af0fd3689cc1cd2f9b772d883d0.tar.gz cmumble-7deb194171233af0fd3689cc1cd2f9b772d883d0.tar.bz2 cmumble-7deb194171233af0fd3689cc1cd2f9b772d883d0.zip |
Fix warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/cmumble.c | 7 | ||||
-rw-r--r-- | src/io.c | 5 | ||||
-rw-r--r-- | src/messages.c | 12 |
3 files changed, 15 insertions, 9 deletions
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"; @@ -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); |