Fixed various warnings.
This commit is contained in:
parent
c505cc0270
commit
d48265348a
|
@ -122,7 +122,7 @@ void nodemcu_init(void)
|
||||||
flash_rom_set_size_byte(flash_safe_get_size_byte());
|
flash_rom_set_size_byte(flash_safe_get_size_byte());
|
||||||
|
|
||||||
// Reboot to get SDK to use (or write) init data at new location
|
// Reboot to get SDK to use (or write) init data at new location
|
||||||
system_restart ();
|
esp_restart ();
|
||||||
|
|
||||||
// Don't post the start_lua task, we're about to reboot...
|
// Don't post the start_lua task, we're about to reboot...
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -649,7 +649,7 @@ LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) {
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#include C_HEADER_FCNTL
|
#include <fcntl.h>
|
||||||
|
|
||||||
typedef struct LoadFSF {
|
typedef struct LoadFSF {
|
||||||
int extraline;
|
int extraline;
|
||||||
|
@ -688,7 +688,7 @@ static int errfsfile (lua_State *L, const char *what, int fnameindex) {
|
||||||
|
|
||||||
LUALIB_API int luaL_loadfsfile (lua_State *L, const char *filename) {
|
LUALIB_API int luaL_loadfsfile (lua_State *L, const char *filename) {
|
||||||
LoadFSF lf;
|
LoadFSF lf;
|
||||||
int status, readstatus;
|
int status;
|
||||||
int c;
|
int c;
|
||||||
int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */
|
int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */
|
||||||
lf.extraline = 0;
|
lf.extraline = 0;
|
||||||
|
|
|
@ -603,6 +603,7 @@ static void createmeta (lua_State *L) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void createstdfile (lua_State *L, int f, int k, const char *fname) {
|
static void createstdfile (lua_State *L, int f, int k, const char *fname) {
|
||||||
*newfile(L) = f;
|
*newfile(L) = f;
|
||||||
#if LUA_OPTIMIZE_MEMORY != 2
|
#if LUA_OPTIMIZE_MEMORY != 2
|
||||||
|
@ -619,6 +620,7 @@ static void createstdfile (lua_State *L, int f, int k, const char *fname) {
|
||||||
lua_setfield(L, -2, fname);
|
lua_setfield(L, -2, fname);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LUA_OPTIMIZE_MEMORY != 2
|
#if LUA_OPTIMIZE_MEMORY != 2
|
||||||
static void newfenv (lua_State *L, lua_CFunction cls) {
|
static void newfenv (lua_State *L, lua_CFunction cls) {
|
||||||
|
|
|
@ -128,15 +128,14 @@ static int docall (lua_State *L, int narg, int clear) {
|
||||||
|
|
||||||
|
|
||||||
static void print_version (lua_State *L) {
|
static void print_version (lua_State *L) {
|
||||||
lua_pushliteral (L, NODE_VERSION " build " BUILD_DATE " powered by " LUA_RELEASE " on IDF ");
|
lua_pushliteral (L, NODE_VERSION " build " BUILD_DATE " powered by " LUA_RELEASE);
|
||||||
lua_pushstring (L, system_get_sdk_version ());
|
|
||||||
lua_concat (L, 2);
|
|
||||||
const char *msg = lua_tostring (L, -1);
|
const char *msg = lua_tostring (L, -1);
|
||||||
l_message (NULL, msg);
|
l_message (NULL, msg);
|
||||||
lua_pop (L, 1);
|
lua_pop (L, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int getargs (lua_State *L, char **argv, int n) {
|
static int getargs (lua_State *L, char **argv, int n) {
|
||||||
int narg;
|
int narg;
|
||||||
int i;
|
int i;
|
||||||
|
@ -154,7 +153,6 @@ static int getargs (lua_State *L, char **argv, int n) {
|
||||||
return narg;
|
return narg;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static int dofile (lua_State *L, const char *name) {
|
static int dofile (lua_State *L, const char *name) {
|
||||||
int status = luaL_loadfile(L, name) || docall(L, 0, 1);
|
int status = luaL_loadfile(L, name) || docall(L, 0, 1);
|
||||||
return report(L, status);
|
return report(L, status);
|
||||||
|
@ -477,7 +475,7 @@ void donejob(lua_Load *load){
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dojob(lua_Load *load){
|
static void dojob(lua_Load *load){
|
||||||
size_t l, rs;
|
size_t l;
|
||||||
int status;
|
int status;
|
||||||
char *b = load->line;
|
char *b = load->line;
|
||||||
lua_State *L = load->L;
|
lua_State *L = load->L;
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
// Lua: heap()
|
// Lua: heap()
|
||||||
static int node_heap( lua_State* L )
|
static int node_heap( lua_State* L )
|
||||||
{
|
{
|
||||||
uint32_t sz = system_get_free_heap_size();
|
uint32_t sz = esp_get_free_heap_size();
|
||||||
lua_pushinteger(L, sz);
|
lua_pushinteger(L, sz);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue