Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/threads-ffi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonan Collobert <ronan@collobert.com>2015-04-21 05:37:50 +0300
committerRonan Collobert <ronan@collobert.com>2015-04-21 05:37:50 +0300
commitc1a9c95432af176ba0f3db6c51ba2bf7b29d2a29 (patch)
treea563557d4b167f2a80565f3f2f538236f75dbf8a
parent9665a4b99eed85ccfad1e03a581ff14428d6dace (diff)
fix unused variables
-rw-r--r--lib/queue.c5
-rw-r--r--lib/threads.c1
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/queue.c b/lib/queue.c
index 9ed7fa3..a19cb6f 100644
--- a/lib/queue.c
+++ b/lib/queue.c
@@ -26,7 +26,6 @@ typedef struct THQueue_ {
static int queue_new(lua_State *L)
{
THQueue *queue = NULL;
- THQueue **queue_udata = NULL;
if(lua_gettop(L) == 1) {
@@ -180,7 +179,7 @@ static int queue_get_size(lua_State *L)
static int queue__index(lua_State *L)
{
- THQueue *queue = luaTHRD_checkudata(L, 1, "threads.Queue");
+ luaTHRD_checkudata(L, 1, "threads.Queue");
lua_getmetatable(L, 1);
if(lua_isstring(L, 2)) {
lua_pushstring(L, "__get");
@@ -295,7 +294,7 @@ static int queue_set_isfull(lua_State *L)
static int queue__newindex(lua_State *L)
{
- THQueue *queue = luaTHRD_checkudata(L, 1, "threads.Queue");
+ luaTHRD_checkudata(L, 1, "threads.Queue");
if(lua_gettop(L) != 3)
luaL_error(L, "invalid arguments");
diff --git a/lib/threads.c b/lib/threads.c
index b670540..11773ca 100644
--- a/lib/threads.c
+++ b/lib/threads.c
@@ -20,7 +20,6 @@ static int newthread(void *code_)
}
luaL_openlibs(L);
- long addr = (long)code;
if(luaL_loadstring(L, code)) {
printf("FATAL THREAD PANIC: (loadstring) %s\n", lua_tolstring(L, -1, NULL));
free(code);