aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2011-11-09 17:18:29 +0100
committerBenoit Germain <bnt.germain@gmail.com>2011-11-09 17:18:29 +0100
commitd3cf02aa89d8fea98cd89f83fe4ca2c871e744c2 (patch)
tree9720f30179f7b420c2cedce149b17a422e5734c4 /src
parent7326963a22c73ff9d7c8cb02a3ca16d41decdc91 (diff)
downloadlanes-d3cf02aa89d8fea98cd89f83fe4ca2c871e744c2.tar.gz
lanes-d3cf02aa89d8fea98cd89f83fe4ca2c871e744c2.tar.bz2
lanes-d3cf02aa89d8fea98cd89f83fe4ca2c871e744c2.zip
some more compilation warning fixes
Diffstat (limited to 'src')
-rw-r--r--src/lanes.c15
-rw-r--r--src/threading.c1
-rw-r--r--src/tools.c4
3 files changed, 11 insertions, 9 deletions
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)
1358 1358
1359LUAG_FUNC( set_debug_threadname) 1359LUAG_FUNC( set_debug_threadname)
1360{ 1360{
1361 char const *threadName;
1362 luaL_checktype( L, -1, LUA_TSTRING); 1361 luaL_checktype( L, -1, LUA_TSTRING);
1363 threadName = lua_tostring( L, -1);
1364
1365#if defined PLATFORM_WIN32 && !defined __GNUC__ 1362#if defined PLATFORM_WIN32 && !defined __GNUC__
1366 // to see thead name in Visual Studio C debugger 1363 {
1367 SetThreadName(-1, threadName); 1364 char const *threadName = lua_tostring( L, -1);
1368#endif
1369 1365
1366 // to see thead name in Visual Studio C debugger
1367 SetThreadName(-1, threadName);
1368 }
1369#endif // defined PLATFORM_WIN32 && !defined __GNUC__
1370 // to see VM name in Decoda debugger Virtual Machine window 1370 // to see VM name in Decoda debugger Virtual Machine window
1371 lua_setglobal( L, "decoda_name"); 1371 lua_setglobal( L, "decoda_name");
1372 1372
@@ -2203,7 +2203,8 @@ LUAG_FUNC( now_secs )
2203LUAG_FUNC( wakeup_conv ) 2203LUAG_FUNC( wakeup_conv )
2204{ 2204{
2205 int year, month, day, hour, min, sec, isdst; 2205 int year, month, day, hour, min, sec, isdst;
2206 struct tm t = {0,0,0,0,0,0,0,0,0}; 2206 struct tm t;
2207 memset( &t, 0, sizeof( t));
2207 // 2208 //
2208 // .year (four digits) 2209 // .year (four digits)
2209 // .month (1..12) 2210 // .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 ) {
698 /* Since we've set the thread up as PTHREAD_CREATE_DETACHED, we cannot 698 /* Since we've set the thread up as PTHREAD_CREATE_DETACHED, we cannot
699 * join with it. Use the cond.var. 699 * join with it. Use the cond.var.
700 */ 700 */
701 (void) ref; // unused
701 MUTEX_LOCK( mu_ref ); 702 MUTEX_LOCK( mu_ref );
702 703
703 // 'secs'==0.0 does not need to wait, just take the current status 704 // '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 _
288 { 288 {
289 if( luaG_getfuncsubtype( L, -1) != FST_Bytecode) 289 if( luaG_getfuncsubtype( L, -1) != FST_Bytecode)
290 { 290 {
291 char const *fqnString; 291 //char const *fqnString; for debugging
292 bool_t not_registered; 292 bool_t not_registered;
293 // first, skip everything if the function is already known 293 // first, skip everything if the function is already known
294 lua_pushvalue( L, -1); // ... {_i} {bfc} k func func 294 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 _
302 lua_pushvalue( L, -2); // ... {_i} {bfc} k func k 302 lua_pushvalue( L, -2); // ... {_i} {bfc} k func k
303 lua_rawseti( L, fqn, _depth); // ... {_i} {bfc} k func 303 lua_rawseti( L, fqn, _depth); // ... {_i} {bfc} k func
304 // generate name 304 // generate name
305 fqnString = luaG_pushFQN( L, fqn, _depth); // ... {_i} {bfc} k func "f.q.n" 305 /*fqnString =*/ (void) luaG_pushFQN( L, fqn, _depth); // ... {_i} {bfc} k func "f.q.n"
306 //puts( fqnString); 306 //puts( fqnString);
307 // prepare the stack for database feed 307 // prepare the stack for database feed
308 lua_pushvalue( L, -1); // ... {_i} {bfc} k func "f.q.n" "f.q.n" 308 lua_pushvalue( L, -1); // ... {_i} {bfc} k func "f.q.n" "f.q.n"