aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-15 14:15:36 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-15 14:15:36 +0000
commit5f7ea0a8dac6e279d4f15153f4833df1793a9c74 (patch)
tree2182d174f24c848ed92c14eb65b65a2ab5749863 /src
parentaa94ab811d09e8ca5988705e708c35e406487b1d (diff)
downloadluaevent-prosody-5f7ea0a8dac6e279d4f15153f4833df1793a9c74.tar.gz
luaevent-prosody-5f7ea0a8dac6e279d4f15153f4833df1793a9c74.zip
event_buffer.c: Silence warnings about uninitialized variable 'ret'
Diffstat (limited to 'src')
-rw-r--r--src/event_buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/event_buffer.c b/src/event_buffer.c
index 23e28c4..ea66a94 100644
--- a/src/event_buffer.c
+++ b/src/event_buffer.c
@@ -200,6 +200,7 @@ static int event_buffer_write(lua_State* L) {
} else if(lua_isuserdata(L, 2)) {
ret = evbuffer_write(buf->buffer, getSocketFd(L, 2));
} else {
+ ret = 0; /* Shush uninitialized warning */
luaL_argerror(L, 2, "Unexpected data type. Expects: integer/lightuserdata/socket");
}
lua_pushinteger(L, ret);
@@ -221,6 +222,7 @@ static int event_buffer_read(lua_State* L) {
} else if(lua_isuserdata(L, 2)) {
ret = evbuffer_read(buf->buffer, getSocketFd(L, 2), len);
} else {
+ ret = 0; /* Shush uninitialized warning */
luaL_argerror(L, 2, "Unexpected data type. Expects: integer/lightuserdata/socket");
}
lua_pushinteger(L, ret);