From d3cf02aa89d8fea98cd89f83fe4ca2c871e744c2 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Wed, 9 Nov 2011 17:18:29 +0100 Subject: some more compilation warning fixes --- src/lanes.c | 15 ++++++++------- src/threading.c | 1 + src/tools.c | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/lanes.c b/src/lanes.c index 1ebe91d..aef1015 100644 --- a/src/lanes.c +++ b/src/lanes.c @@ -1358,15 +1358,15 @@ void SetThreadName( DWORD dwThreadID, char const *_threadName) LUAG_FUNC( set_debug_threadname) { - char const *threadName; luaL_checktype( L, -1, LUA_TSTRING); - threadName = lua_tostring( L, -1); - #if defined PLATFORM_WIN32 && !defined __GNUC__ - // to see thead name in Visual Studio C debugger - SetThreadName(-1, threadName); -#endif + { + char const *threadName = lua_tostring( L, -1); + // to see thead name in Visual Studio C debugger + SetThreadName(-1, threadName); + } +#endif // defined PLATFORM_WIN32 && !defined __GNUC__ // to see VM name in Decoda debugger Virtual Machine window lua_setglobal( L, "decoda_name"); @@ -2203,7 +2203,8 @@ LUAG_FUNC( now_secs ) LUAG_FUNC( wakeup_conv ) { int year, month, day, hour, min, sec, isdst; - struct tm t = {0,0,0,0,0,0,0,0,0}; + struct tm t; + memset( &t, 0, sizeof( t)); // // .year (four digits) // .month (1..12) diff --git a/src/threading.c b/src/threading.c index 4e3d8f6..22d18d4 100644 --- a/src/threading.c +++ b/src/threading.c @@ -698,6 +698,7 @@ static void prepare_timeout( struct timespec *ts, time_d abs_secs ) { /* Since we've set the thread up as PTHREAD_CREATE_DETACHED, we cannot * join with it. Use the cond.var. */ + (void) ref; // unused MUTEX_LOCK( mu_ref ); // 'secs'==0.0 does not need to wait, just take the current status diff --git a/src/tools.c b/src/tools.c index 36e0051..85672e2 100644 --- a/src/tools.c +++ b/src/tools.c @@ -288,7 +288,7 @@ static void populate_func_lookup_table_recur( lua_State *L, int _ctx_base, int _ { if( luaG_getfuncsubtype( L, -1) != FST_Bytecode) { - char const *fqnString; + //char const *fqnString; for debugging bool_t not_registered; // first, skip everything if the function is already known lua_pushvalue( L, -1); // ... {_i} {bfc} k func func @@ -302,7 +302,7 @@ static void populate_func_lookup_table_recur( lua_State *L, int _ctx_base, int _ lua_pushvalue( L, -2); // ... {_i} {bfc} k func k lua_rawseti( L, fqn, _depth); // ... {_i} {bfc} k func // generate name - fqnString = luaG_pushFQN( L, fqn, _depth); // ... {_i} {bfc} k func "f.q.n" + /*fqnString =*/ (void) luaG_pushFQN( L, fqn, _depth); // ... {_i} {bfc} k func "f.q.n" //puts( fqnString); // prepare the stack for database feed lua_pushvalue( L, -1); // ... {_i} {bfc} k func "f.q.n" "f.q.n" -- cgit v1.2.3-55-g6feb