eris: clean up compiler warnings

This commit is contained in:
2021-12-08 13:36:46 -05:00
parent b55040665c
commit ddda9df518
3 changed files with 15 additions and 25 deletions

View File

@@ -20,11 +20,6 @@
#include "lualib.h" #include "lualib.h"
static int luaB_printaddr (lua_State *L) {
int n = lua_gettop(L);
}
static int luaB_print (lua_State *L) { static int luaB_print (lua_State *L) {
int n = lua_gettop(L); /* number of arguments */ int n = lua_gettop(L); /* number of arguments */
int i; int i;

View File

@@ -571,24 +571,20 @@ l_noret luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2) {
} }
static void addinfo (lua_State *L, const char *msg) { // static void addinfo (lua_State *L, const char *msg) {
CallInfo *ci = L->ci; // CallInfo *ci = L->ci;
if (isLua(ci)) { /* is Lua code? */ // if (isLua(ci)) { /* is Lua code? */
char buff[LUA_IDSIZE]; /* add file:line information */ // char buff[LUA_IDSIZE]; /* add file:line information */
int line = currentline(ci); // int line = currentline(ci);
TString *src = ci_func(ci)->p->source; // TString *src = ci_func(ci)->p->source;
if (src) // if (src)
luaO_chunkid(buff, getstr(src), LUA_IDSIZE); // luaO_chunkid(buff, getstr(src), LUA_IDSIZE);
else { /* no source available; use "?" instead */ // else { /* no source available; use "?" instead */
buff[0] = '?'; buff[1] = '\0'; // buff[0] = '?'; buff[1] = '\0';
} // }
luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); // luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
} // }
} // }
static void no_addinfo (lua_State *L, const char *msg) {
// do nothing.
}
l_noret luaG_errormsg (lua_State *L) { l_noret luaG_errormsg (lua_State *L) {
if (L->errfunc != 0) { /* is there an error handling function? */ if (L->errfunc != 0) { /* is there an error handling function? */
@@ -606,7 +602,7 @@ l_noret luaG_errormsg (lua_State *L) {
l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
va_list argp; va_list argp;
va_start(argp, fmt); va_start(argp, fmt);
no_addinfo(L, luaO_pushvfstring(L, fmt, argp)); // addinfo(L, luaO_pushvfstring(L, fmt, argp));
va_end(argp); va_end(argp);
luaG_errormsg(L); luaG_errormsg(L);
} }

View File

@@ -647,7 +647,6 @@ static void clearvalues (global_State *g, GCObject *l, GCObject *f) {
int i; int i;
for (i = 0; i < h->sizearray; i++) { for (i = 0; i < h->sizearray; i++) {
ANode *anode = h->array + i; ANode *anode = h->array + i;
TValue *o = &h->array[i].i_val;
if (iscleared(g, &anode->i_val)) /* value was collected? */ if (iscleared(g, &anode->i_val)) /* value was collected? */
luaH_setnil(h, anode); luaH_setnil(h, anode);
} }