From 5f7ea0a8dac6e279d4f15153f4833df1793a9c74 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 15 Feb 2010 14:15:36 +0000 Subject: event_buffer.c: Silence warnings about uninitialized variable 'ret' --- src/event_buffer.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3