summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lapi.c8
-rw-r--r--lauxlib.c9
-rw-r--r--loadlib.c10
3 files changed, 13 insertions, 14 deletions
diff --git a/lapi.c b/lapi.c
index acc991c3..924a9124 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.157 2011/11/16 18:51:36 roberto Exp roberto $ 2** $Id: lapi.c,v 2.158 2011/11/29 15:55:08 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1209,7 +1209,7 @@ static const char *aux_upvalue (StkId fi, int n, TValue **val,
1209 1209
1210LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) { 1210LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
1211 const char *name; 1211 const char *name;
1212 TValue *val = NULL; /* initialized to avoid warnings */ 1212 TValue *val = NULL; /* to avoid warnings */
1213 lua_lock(L); 1213 lua_lock(L);
1214 name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL); 1214 name = aux_upvalue(index2addr(L, funcindex), n, &val, NULL);
1215 if (name) { 1215 if (name) {
@@ -1223,8 +1223,8 @@ LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n) {
1223 1223
1224LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) { 1224LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n) {
1225 const char *name; 1225 const char *name;
1226 TValue *val = NULL; /* initialized to avoid warnings */ 1226 TValue *val = NULL; /* to avoid warnings */
1227 GCObject *owner = NULL; /* initialized to avoid warnings */ 1227 GCObject *owner = NULL; /* to avoid warnings */
1228 StkId fi; 1228 StkId fi;
1229 lua_lock(L); 1229 lua_lock(L);
1230 fi = index2addr(L, funcindex); 1230 fi = index2addr(L, funcindex);
diff --git a/lauxlib.c b/lauxlib.c
index fa17dfbd..e08da9bc 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lauxlib.c,v 1.236 2011/11/14 17:10:24 roberto Exp roberto $ 2** $Id: lauxlib.c,v 1.237 2011/11/29 15:55:08 roberto Exp roberto $
3** Auxiliary functions for building Lua libraries 3** Auxiliary functions for building Lua libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -567,7 +567,7 @@ typedef struct LoadF {
567 567
568static const char *getF (lua_State *L, void *ud, size_t *size) { 568static const char *getF (lua_State *L, void *ud, size_t *size) {
569 LoadF *lf = (LoadF *)ud; 569 LoadF *lf = (LoadF *)ud;
570 (void)L; 570 (void)L; /* not used */
571 if (lf->n > 0) { /* are there pre-read characters to be read? */ 571 if (lf->n > 0) { /* are there pre-read characters to be read? */
572 *size = lf->n; /* return them (chars already in buffer) */ 572 *size = lf->n; /* return them (chars already in buffer) */
573 lf->n = 0; /* no more pre-read characters */ 573 lf->n = 0; /* no more pre-read characters */
@@ -668,7 +668,7 @@ typedef struct LoadS {
668 668
669static const char *getS (lua_State *L, void *ud, size_t *size) { 669static const char *getS (lua_State *L, void *ud, size_t *size) {
670 LoadS *ls = (LoadS *)ud; 670 LoadS *ls = (LoadS *)ud;
671 (void)L; 671 (void)L; /* not used */
672 if (ls->size == 0) return NULL; 672 if (ls->size == 0) return NULL;
673 *size = ls->size; 673 *size = ls->size;
674 ls->size = 0; 674 ls->size = 0;
@@ -915,8 +915,7 @@ LUALIB_API const char *luaL_gsub (lua_State *L, const char *s, const char *p,
915 915
916 916
917static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) { 917static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
918 (void)ud; 918 (void)ud; (void)osize; /* not used */
919 (void)osize;
920 if (nsize == 0) { 919 if (nsize == 0) {
921 free(ptr); 920 free(ptr);
922 return NULL; 921 return NULL;
diff --git a/loadlib.c b/loadlib.c
index e0e4c393..02787ef7 100644
--- a/loadlib.c
+++ b/loadlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loadlib.c,v 1.105 2011/11/25 12:52:03 roberto Exp roberto $ 2** $Id: loadlib.c,v 1.106 2011/11/28 17:27:51 roberto Exp roberto $
3** Dynamic library loader for Lua 3** Dynamic library loader for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5** 5**
@@ -197,7 +197,7 @@ static void ll_unloadlib (void *lib) {
197 197
198static void *ll_load (lua_State *L, const char *path, int seeglb) { 198static void *ll_load (lua_State *L, const char *path, int seeglb) {
199 HMODULE lib = LoadLibraryExA(path, NULL, LUA_LLE_FLAGS); 199 HMODULE lib = LoadLibraryExA(path, NULL, LUA_LLE_FLAGS);
200 (void)(seeglb); /* symbols are 'global' by default */ 200 (void)(seeglb); /* not used: symbols are 'global' by default */
201 if (lib == NULL) pusherror(L); 201 if (lib == NULL) pusherror(L);
202 return lib; 202 return lib;
203} 203}
@@ -227,19 +227,19 @@ static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
227 227
228 228
229static void ll_unloadlib (void *lib) { 229static void ll_unloadlib (void *lib) {
230 (void)(lib); /* to avoid warnings */ 230 (void)(lib); /* not used */
231} 231}
232 232
233 233
234static void *ll_load (lua_State *L, const char *path, int seeglb) { 234static void *ll_load (lua_State *L, const char *path, int seeglb) {
235 (void)(path); (void)(seeglb); /* to avoid warnings */ 235 (void)(path); (void)(seeglb); /* not used */
236 lua_pushliteral(L, DLMSG); 236 lua_pushliteral(L, DLMSG);
237 return NULL; 237 return NULL;
238} 238}
239 239
240 240
241static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) { 241static lua_CFunction ll_sym (lua_State *L, void *lib, const char *sym) {
242 (void)(lib); (void)(sym); /* to avoid warnings */ 242 (void)(lib); (void)(sym); /* not used */
243 lua_pushliteral(L, DLMSG); 243 lua_pushliteral(L, DLMSG);
244 return NULL; 244 return NULL;
245} 245}